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
commit fbb8893513
Notes: sideshowbarker 2024-07-17 09:50:44 +09:00

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)