1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

PixelPaint: Call set_modified on window

Call set_modified on window in order to reflect unsaved
changed in the titlebar's close button
This commit is contained in:
GeekFiftyFive 2022-03-23 19:25:54 +00:00 committed by Andreas Kling
parent 7eb672c457
commit ff8a6d8e59
3 changed files with 18 additions and 0 deletions

View file

@ -88,6 +88,10 @@ MainWidget::MainWidget()
m_palette_widget->set_image_editor(&image_editor);
m_layer_list_widget->set_image(&image_editor.image());
m_layer_properties_widget->set_layer(image_editor.active_layer());
window()->set_modified(image_editor.is_modified());
image_editor.on_modified_change = [this](bool modified) {
window()->set_modified(modified);
};
if (auto* active_tool = m_toolbox->active_tool())
image_editor.set_active_tool(active_tool);
m_show_guides_action->set_checked(image_editor.guide_visibility());