1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:47:35 +00:00

PixelPaint: Omit file extension in tab/editor titles

This commit removes the file extension in the presented title of images,
and fixes an issue with the previous commit wherein "save as" on an
image would always append ".pp" as an extension, even when the filename
already included this extension.
This commit is contained in:
Lennon Donaghy 2022-06-29 16:33:01 +01:00 committed by Andreas Kling
parent 7919b4368e
commit fbb8893513

View file

@ -102,7 +102,7 @@ void ImageEditor::set_title(String title)
void ImageEditor::set_path(String path)
{
m_path = move(path);
set_title(LexicalPath::basename(m_path));
set_title(LexicalPath::title(m_path));
}
void ImageEditor::paint_event(GUI::PaintEvent& event)