summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint
diff options
context:
space:
mode:
authorAatos Majava <aatos.majava@protonmail.com>2021-06-16 20:19:21 +0300
committerAndreas Kling <kling@serenityos.org>2021-06-16 21:27:05 +0200
commita49a15cabf53f300fdac8cb58acc89b19d5792ef (patch)
treed99620a060549cc60a54cdceaf0fa9c9d65255d3 /Userland/Applications/PixelPaint
parent25a292f534008db2794ea3f28c07d3a619a434ee (diff)
downloadserenity-a49a15cabf53f300fdac8cb58acc89b19d5792ef.zip
PixelPaint: Set the image title when creating a new image
Diffstat (limited to 'Userland/Applications/PixelPaint')
-rw-r--r--Userland/Applications/PixelPaint/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp
index 1b782afa72..b6747352d4 100644
--- a/Userland/Applications/PixelPaint/main.cpp
+++ b/Userland/Applications/PixelPaint/main.cpp
@@ -97,6 +97,8 @@ int main(int argc, char** argv)
VERIFY(bg_layer);
image->add_layer(*bg_layer);
bg_layer->bitmap().fill(Color::White);
+ auto image_title = dialog->image_name().trim_whitespace();
+ image->set_title(image_title.is_empty() ? "Untitled" : image_title);
auto& image_editor = create_new_editor(*image);
layer_list_widget.set_image(image);