From fbb8893513f060df27400ed6dab965e046960c36 Mon Sep 17 00:00:00 2001 From: Lennon Donaghy Date: Wed, 29 Jun 2022 16:33:01 +0100 Subject: [PATCH] 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. --- Userland/Applications/PixelPaint/ImageEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/PixelPaint/ImageEditor.cpp b/Userland/Applications/PixelPaint/ImageEditor.cpp index 684d1839b7..8a3ffb26d9 100644 --- a/Userland/Applications/PixelPaint/ImageEditor.cpp +++ b/Userland/Applications/PixelPaint/ImageEditor.cpp @@ -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)