From 260d9fbd527197777cca3097eba75d4fb52004f9 Mon Sep 17 00:00:00 2001 From: Christian Kaiser Date: Wed, 30 Jul 2025 20:41:47 -0300 Subject: [PATCH] Improved logic, comments, unused include cleanup --- src/app/commands/cmd_about.cpp | 1 - src/app/commands/cmd_advanced_mode.cpp | 2 -- src/app/commands/cmd_background_from_layer.cpp | 1 - src/app/commands/cmd_canvas_size.cpp | 1 - src/app/commands/cmd_change_brush.cpp | 1 - src/app/commands/cmd_change_pixel_format.cpp | 4 ---- src/app/commands/cmd_clear_cel.cpp | 1 - src/app/commands/cmd_close_file.cpp | 6 ------ src/app/commands/cmd_color_quantization.cpp | 1 - src/app/commands/cmd_copy_cel.cpp | 2 -- src/app/commands/cmd_crop.cpp | 4 ---- src/app/commands/cmd_deselect_mask.cpp | 2 -- src/app/commands/cmd_discard_brush.cpp | 2 -- src/app/commands/cmd_duplicate_layer.cpp | 5 ----- src/app/commands/cmd_duplicate_sprite.cpp | 3 --- src/app/commands/cmd_duplicate_view.cpp | 2 -- src/app/commands/cmd_enter_license.cpp | 1 - src/app/commands/cmd_exit.cpp | 1 - src/app/commands/cmd_export_sprite_sheet.cpp | 3 --- src/app/commands/cmd_eyedropper.cpp | 1 - src/app/commands/cmd_fit_screen.cpp | 1 - src/app/commands/cmd_flip.cpp | 2 -- src/app/commands/cmd_frame_properties.cpp | 13 ++++--------- src/app/commands/cmd_frame_tag_properties.cpp | 1 - src/app/commands/cmd_fullscreen_preview.cpp | 3 --- src/app/commands/cmd_goto_layer.cpp | 4 ++-- src/app/commands/cmd_grid.cpp | 4 ---- src/app/commands/cmd_import_sprite_sheet.cpp | 6 ------ src/app/commands/cmd_keyboard_shortcuts.cpp | 5 ----- src/app/commands/cmd_layer_from_background.cpp | 2 -- src/app/commands/cmd_layer_lock.cpp | 2 -- src/app/commands/cmd_layer_opacity.cpp | 1 - src/app/commands/cmd_layer_properties.cpp | 1 - src/app/commands/cmd_layer_visibility.cpp | 1 - src/app/commands/cmd_link_cels.cpp | 1 - src/app/commands/cmd_mask_by_color.cpp | 4 ---- src/app/commands/cmd_mask_content.cpp | 1 - src/app/commands/cmd_merge_down_layer.cpp | 4 ---- src/app/commands/cmd_modify_selection.cpp | 4 ---- src/app/commands/cmd_move_cel.cpp | 1 - src/app/commands/cmd_move_mask.cpp | 4 ---- src/app/commands/cmd_new_frame.cpp | 10 ---------- src/app/commands/cmd_new_frame_tag.cpp | 3 --- src/app/commands/cmd_new_layer.cpp | 3 --- src/app/commands/cmd_new_sprite_from_selection.cpp | 2 -- src/app/commands/cmd_onionskin.cpp | 1 - src/app/commands/cmd_open_file.cpp | 2 -- src/app/commands/cmd_options.cpp | 1 - src/app/commands/cmd_palette_size.cpp | 1 - src/app/commands/cmd_paste_text.cpp | 4 ---- src/app/commands/cmd_pixel_perfect_mode.cpp | 2 -- src/app/commands/cmd_refresh.cpp | 2 -- src/app/commands/cmd_remove_frame.cpp | 1 - src/app/commands/cmd_remove_frame_tag.cpp | 1 - src/app/commands/cmd_remove_slice.cpp | 2 -- src/app/commands/cmd_reopen_closed_file.cpp | 4 ---- src/app/commands/cmd_reselect_mask.cpp | 1 - src/app/commands/cmd_rotate.cpp | 5 +---- src/app/commands/cmd_run_script.cpp | 3 --- src/app/commands/cmd_save_file.cpp | 2 -- src/app/commands/cmd_save_mask.cpp | 7 ++----- src/app/commands/cmd_save_palette.cpp | 2 -- src/app/commands/cmd_scroll.cpp | 2 -- src/app/commands/cmd_scroll_center.cpp | 1 - src/app/commands/cmd_select_palette.cpp | 1 - src/app/commands/cmd_select_tile.cpp | 1 - src/app/commands/cmd_set_palette.cpp | 1 - src/app/commands/cmd_set_same_ink.cpp | 1 - src/app/commands/cmd_sprite_properties.cpp | 1 - src/app/commands/cmd_swap_checkerboard_colors.cpp | 2 -- src/app/commands/cmd_switch_colors.cpp | 1 - src/app/commands/cmd_symmetry_mode.cpp | 2 -- src/app/commands/cmd_toggle_timeline_thumbnails.cpp | 1 - src/app/commands/cmd_undo.cpp | 1 - src/app/commands/cmd_undo_history.cpp | 2 -- src/app/commands/cmd_unlink_cel.cpp | 1 - 76 files changed, 9 insertions(+), 177 deletions(-) diff --git a/src/app/commands/cmd_about.cpp b/src/app/commands/cmd_about.cpp index 24bf4e19c..819adb4a2 100644 --- a/src/app/commands/cmd_about.cpp +++ b/src/app/commands/cmd_about.cpp @@ -11,7 +11,6 @@ #include "app/app.h" #include "app/commands/command.h" -#include "app/modules/gui.h" #include "app/ui/main_window.h" #include "fmt/format.h" #include "ver/info.h" diff --git a/src/app/commands/cmd_advanced_mode.cpp b/src/app/commands/cmd_advanced_mode.cpp index 3a46d9bba..b93a2cc7b 100644 --- a/src/app/commands/cmd_advanced_mode.cpp +++ b/src/app/commands/cmd_advanced_mode.cpp @@ -19,8 +19,6 @@ #include "advanced_mode.xml.h" #include "app/context.h" -#include - namespace app { using namespace ui; diff --git a/src/app/commands/cmd_background_from_layer.cpp b/src/app/commands/cmd_background_from_layer.cpp index a23d7b93c..5442159b4 100644 --- a/src/app/commands/cmd_background_from_layer.cpp +++ b/src/app/commands/cmd_background_from_layer.cpp @@ -15,7 +15,6 @@ #include "app/modules/gui.h" #include "app/tx.h" #include "doc/layer.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_canvas_size.cpp b/src/app/commands/cmd_canvas_size.cpp index 86204962e..f3ad7ea50 100644 --- a/src/app/commands/cmd_canvas_size.cpp +++ b/src/app/commands/cmd_canvas_size.cpp @@ -22,7 +22,6 @@ #include "app/ui/skin/skin_theme.h" #include "app/ui_context.h" #include "doc/image.h" -#include "doc/mask.h" #include "doc/sprite.h" #include "ui/ui.h" diff --git a/src/app/commands/cmd_change_brush.cpp b/src/app/commands/cmd_change_brush.cpp index f83a1da79..22e570cb5 100644 --- a/src/app/commands/cmd_change_brush.cpp +++ b/src/app/commands/cmd_change_brush.cpp @@ -21,7 +21,6 @@ #include "app/tools/tool.h" #include "app/ui/context_bar.h" #include "app/ui/main_window.h" -#include "base/convert_to.h" #include "doc/algorithm/flip_image.h" #include "doc/brush.h" #include "doc/image_ref.h" diff --git a/src/app/commands/cmd_change_pixel_format.cpp b/src/app/commands/cmd_change_pixel_format.cpp index 4b899e3b3..00639e3b6 100644 --- a/src/app/commands/cmd_change_pixel_format.cpp +++ b/src/app/commands/cmd_change_pixel_format.cpp @@ -21,9 +21,7 @@ #include "app/i18n/strings.h" #include "app/load_matrix.h" #include "app/modules/gui.h" -#include "app/modules/palettes.h" #include "app/sprite_job.h" -#include "app/transaction.h" #include "app/ui/best_fit_criteria_selector.h" #include "app/ui/dithering_selector.h" #include "app/ui/editor/editor.h" @@ -37,12 +35,10 @@ #include "fmt/format.h" #include "render/dithering.h" #include "render/dithering_algorithm.h" -#include "render/ordered_dither.h" #include "render/quantization.h" #include "render/render.h" #include "render/task_delegate.h" #include "ui/listitem.h" -#include "ui/paint_event.h" #include "ui/size_hint_event.h" #include "color_mode.xml.h" diff --git a/src/app/commands/cmd_clear_cel.cpp b/src/app/commands/cmd_clear_cel.cpp index 15865c9c0..7129fb66b 100644 --- a/src/app/commands/cmd_clear_cel.cpp +++ b/src/app/commands/cmd_clear_cel.cpp @@ -19,7 +19,6 @@ #include "app/ui/status_bar.h" #include "doc/cel.h" #include "doc/layer.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_close_file.cpp b/src/app/commands/cmd_close_file.cpp index 8a71ec3ae..48183618d 100644 --- a/src/app/commands/cmd_close_file.cpp +++ b/src/app/commands/cmd_close_file.cpp @@ -12,15 +12,9 @@ #include "app/app.h" #include "app/commands/command.h" #include "app/commands/commands.h" -#include "app/context_access.h" #include "app/ui/doc_view.h" -#include "app/ui/status_bar.h" #include "app/ui/workspace.h" #include "app/ui_context.h" -#include "doc/sprite.h" -#include "ui/ui.h" - -#include namespace app { diff --git a/src/app/commands/cmd_color_quantization.cpp b/src/app/commands/cmd_color_quantization.cpp index de2460447..ef476ee0d 100644 --- a/src/app/commands/cmd_color_quantization.cpp +++ b/src/app/commands/cmd_color_quantization.cpp @@ -21,7 +21,6 @@ #include "app/transaction.h" #include "app/ui/color_bar.h" #include "app/ui/rgbmap_algorithm_selector.h" -#include "app/ui_context.h" #include "doc/palette.h" #include "doc/sprite.h" #include "render/quantization.h" diff --git a/src/app/commands/cmd_copy_cel.cpp b/src/app/commands/cmd_copy_cel.cpp index 17fad104d..925c7e1e5 100644 --- a/src/app/commands/cmd_copy_cel.cpp +++ b/src/app/commands/cmd_copy_cel.cpp @@ -10,9 +10,7 @@ #include "app/app.h" #include "app/commands/command.h" -#include "app/context_access.h" #include "app/ui/timeline/timeline.h" -#include "ui/base.h" namespace app { diff --git a/src/app/commands/cmd_crop.cpp b/src/app/commands/cmd_crop.cpp index fe8c35067..070d4b3d3 100644 --- a/src/app/commands/cmd_crop.cpp +++ b/src/app/commands/cmd_crop.cpp @@ -16,11 +16,7 @@ #include "app/modules/gui.h" #include "app/tx.h" #include "app/ui/color_bar.h" -#include "app/util/autocrop.h" -#include "doc/image.h" -#include "doc/layer.h" #include "doc/mask.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_deselect_mask.cpp b/src/app/commands/cmd_deselect_mask.cpp index 47dbca775..530b51f15 100644 --- a/src/app/commands/cmd_deselect_mask.cpp +++ b/src/app/commands/cmd_deselect_mask.cpp @@ -14,8 +14,6 @@ #include "app/context_access.h" #include "app/modules/gui.h" #include "app/tx.h" -#include "doc/mask.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_discard_brush.cpp b/src/app/commands/cmd_discard_brush.cpp index 7246e3d86..ccbbd78d5 100644 --- a/src/app/commands/cmd_discard_brush.cpp +++ b/src/app/commands/cmd_discard_brush.cpp @@ -12,8 +12,6 @@ #include "app/app.h" #include "app/commands/command.h" #include "app/commands/commands.h" -#include "app/context_access.h" -#include "app/tools/tool_box.h" #include "app/ui/context_bar.h" #include "app/ui_context.h" diff --git a/src/app/commands/cmd_duplicate_layer.cpp b/src/app/commands/cmd_duplicate_layer.cpp index 1dc7d0332..9b5a61bf2 100644 --- a/src/app/commands/cmd_duplicate_layer.cpp +++ b/src/app/commands/cmd_duplicate_layer.cpp @@ -10,16 +10,11 @@ #include "app/app.h" #include "app/commands/command.h" -#include "app/console.h" #include "app/context_access.h" #include "app/doc_api.h" -#include "app/doc_undo.h" #include "app/modules/gui.h" #include "app/tx.h" -#include "app/ui/editor/editor.h" #include "doc/layer.h" -#include "doc/sprite.h" -#include "ui/ui.h" namespace app { diff --git a/src/app/commands/cmd_duplicate_sprite.cpp b/src/app/commands/cmd_duplicate_sprite.cpp index 7ae1823c9..e4b025c89 100644 --- a/src/app/commands/cmd_duplicate_sprite.cpp +++ b/src/app/commands/cmd_duplicate_sprite.cpp @@ -16,13 +16,10 @@ #include "app/ini_file.h" #include "app/ui_context.h" #include "base/fs.h" -#include "doc/sprite.h" #include "ui/ui.h" #include "duplicate_sprite.xml.h" -#include - namespace app { using namespace ui; diff --git a/src/app/commands/cmd_duplicate_view.cpp b/src/app/commands/cmd_duplicate_view.cpp index 8b26c6ace..15c4008d3 100644 --- a/src/app/commands/cmd_duplicate_view.cpp +++ b/src/app/commands/cmd_duplicate_view.cpp @@ -13,8 +13,6 @@ #include "app/commands/command.h" #include "app/ui/workspace.h" -#include - namespace app { // using namespace ui; diff --git a/src/app/commands/cmd_enter_license.cpp b/src/app/commands/cmd_enter_license.cpp index d4e7ffc64..3b6fa0e96 100644 --- a/src/app/commands/cmd_enter_license.cpp +++ b/src/app/commands/cmd_enter_license.cpp @@ -5,7 +5,6 @@ // the End-User License Agreement for Aseprite. #include "app/commands/command.h" -#include "app/context.h" #ifdef ENABLE_DRM #include "app/ui/enter_license.h" diff --git a/src/app/commands/cmd_exit.cpp b/src/app/commands/cmd_exit.cpp index 1eeb0aeea..aa55cb565 100644 --- a/src/app/commands/cmd_exit.cpp +++ b/src/app/commands/cmd_exit.cpp @@ -16,7 +16,6 @@ #include "app/doc.h" #include "app/job.h" #include "app/ui/main_window.h" -#include "ui/alert.h" #ifdef ENABLE_SCRIPTING #include "app/commands/debugger.h" diff --git a/src/app/commands/cmd_export_sprite_sheet.cpp b/src/app/commands/cmd_export_sprite_sheet.cpp index aee25eaa5..bb40ec0c2 100644 --- a/src/app/commands/cmd_export_sprite_sheet.cpp +++ b/src/app/commands/cmd_export_sprite_sheet.cpp @@ -33,15 +33,12 @@ #include "app/ui/status_bar.h" #include "app/ui/timeline/timeline.h" #include "app/util/layer_utils.h" -#include "base/convert_to.h" #include "base/fs.h" #include "base/string.h" #include "base/thread.h" #include "doc/layer.h" -#include "doc/layer_tilemap.h" #include "doc/tag.h" #include "doc/tileset.h" -#include "doc/tilesets.h" #include "fmt/format.h" #include "ui/message.h" #include "ui/system.h" diff --git a/src/app/commands/cmd_eyedropper.cpp b/src/app/commands/cmd_eyedropper.cpp index 418b84647..476f234e8 100644 --- a/src/app/commands/cmd_eyedropper.cpp +++ b/src/app/commands/cmd_eyedropper.cpp @@ -17,7 +17,6 @@ #include "app/context.h" #include "app/pref/preferences.h" #include "app/site.h" -#include "app/tools/tool.h" #include "app/tools/tool_box.h" #include "app/ui/color_bar.h" #include "app/ui/editor/editor.h" diff --git a/src/app/commands/cmd_fit_screen.cpp b/src/app/commands/cmd_fit_screen.cpp index 64b953992..bd09bf7de 100644 --- a/src/app/commands/cmd_fit_screen.cpp +++ b/src/app/commands/cmd_fit_screen.cpp @@ -11,7 +11,6 @@ #include "app/app.h" #include "app/commands/command.h" -#include "app/context_access.h" #include "app/ui/editor/editor.h" namespace app { diff --git a/src/app/commands/cmd_flip.cpp b/src/app/commands/cmd_flip.cpp index 8948a54d9..0bd14833f 100644 --- a/src/app/commands/cmd_flip.cpp +++ b/src/app/commands/cmd_flip.cpp @@ -20,7 +20,6 @@ #include "app/commands/params.h" #include "app/context_access.h" #include "app/doc_api.h" -#include "app/doc_range.h" #include "app/i18n/strings.h" #include "app/modules/gui.h" #include "app/tools/tool_box.h" @@ -38,7 +37,6 @@ #include "doc/layer.h" #include "doc/mask.h" #include "doc/sprite.h" -#include "gfx/size.h" namespace app { diff --git a/src/app/commands/cmd_frame_properties.cpp b/src/app/commands/cmd_frame_properties.cpp index 994003ebb..d6c24efb1 100644 --- a/src/app/commands/cmd_frame_properties.cpp +++ b/src/app/commands/cmd_frame_properties.cpp @@ -58,18 +58,13 @@ void FramePropertiesCommand::onLoadParams(const Params& params) if (frame == "all") { m_target = ALL_FRAMES; } - else if (frame == "current") { + else if (frame == "current" || !params.has_param("frame")) { m_target = CURRENT_RANGE; } - - const auto frameNumber = base::convert_to(frame); - if (frameNumber < 1) { - // Will open with the default target (CURRENT_RANGE) if the frame number cannot be parsed. - m_frame = CURRENT_RANGE; + else { + m_target = SPECIFIC_FRAME; + m_frame = frame_t(base::convert_to(frame)); } - - m_target = SPECIFIC_FRAME; - m_frame = frameNumber; } bool FramePropertiesCommand::onEnabled(Context* context) diff --git a/src/app/commands/cmd_frame_tag_properties.cpp b/src/app/commands/cmd_frame_tag_properties.cpp index 0a6fb502a..52e974f69 100644 --- a/src/app/commands/cmd_frame_tag_properties.cpp +++ b/src/app/commands/cmd_frame_tag_properties.cpp @@ -15,7 +15,6 @@ #include "app/cmd/set_tag_range.h" #include "app/cmd/set_tag_repeat.h" #include "app/cmd/set_user_data.h" -#include "app/color.h" #include "app/commands/command.h" #include "app/commands/params.h" #include "app/context_access.h" diff --git a/src/app/commands/cmd_fullscreen_preview.cpp b/src/app/commands/cmd_fullscreen_preview.cpp index 6783d76eb..eea755197 100644 --- a/src/app/commands/cmd_fullscreen_preview.cpp +++ b/src/app/commands/cmd_fullscreen_preview.cpp @@ -23,10 +23,7 @@ #include "app/ui/main_window.h" #include "app/ui/preview_editor.h" #include "app/ui/status_bar.h" -#include "app/util/conversion_to_surface.h" -#include "doc/image.h" #include "doc/palette.h" -#include "doc/primitives.h" #include "doc/sprite.h" #include "gfx/matrix.h" #include "os/surface.h" diff --git a/src/app/commands/cmd_goto_layer.cpp b/src/app/commands/cmd_goto_layer.cpp index 580c62924..ec74629d8 100644 --- a/src/app/commands/cmd_goto_layer.cpp +++ b/src/app/commands/cmd_goto_layer.cpp @@ -84,12 +84,12 @@ private: class GotoPreviousLayerCommand : public GotoLayerCommand { public: - GotoPreviousLayerCommand() : GotoLayerCommand(-1, "GotoPreviousLayer") {} + GotoPreviousLayerCommand() : GotoLayerCommand(-1, CommandId::GotoPreviousLayer()) {} }; class GotoNextLayerCommand : public GotoLayerCommand { public: - GotoNextLayerCommand() : GotoLayerCommand(+1, "GotoNextLayer") {} + GotoNextLayerCommand() : GotoLayerCommand(+1, CommandId::GotoNextLayer()) {} }; Command* CommandFactory::createGotoPreviousLayerCommand() diff --git a/src/app/commands/cmd_grid.cpp b/src/app/commands/cmd_grid.cpp index 1abb0b2d2..b6f315145 100644 --- a/src/app/commands/cmd_grid.cpp +++ b/src/app/commands/cmd_grid.cpp @@ -15,13 +15,9 @@ #include "app/context.h" #include "app/context_access.h" #include "app/doc.h" -#include "app/find_widget.h" -#include "app/load_widget.h" #include "app/pref/preferences.h" #include "app/tx.h" #include "app/ui/status_bar.h" -#include "app/ui_context.h" -#include "doc/document.h" #include "doc/mask.h" #include "ui/window.h" diff --git a/src/app/commands/cmd_import_sprite_sheet.cpp b/src/app/commands/cmd_import_sprite_sheet.cpp index 86a574d5d..78cae93f0 100644 --- a/src/app/commands/cmd_import_sprite_sheet.cpp +++ b/src/app/commands/cmd_import_sprite_sheet.cpp @@ -20,20 +20,14 @@ #include "app/doc_api.h" #include "app/i18n/strings.h" #include "app/modules/gui.h" -#include "app/modules/palettes.h" #include "app/pref/preferences.h" #include "app/tx.h" -#include "app/ui/drop_down_button.h" #include "app/ui/editor/editor.h" -#include "app/ui/editor/editor_decorator.h" #include "app/ui/editor/select_box_state.h" -#include "app/ui/editor/standby_state.h" #include "app/ui/workspace.h" #include "doc/cel.h" #include "doc/image.h" #include "doc/layer.h" -#include "doc/palette.h" -#include "doc/primitives.h" #include "doc/sprite.h" #include "render/render.h" #include "ui/ui.h" diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index fbe426c84..c85fcc9d7 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -26,22 +26,17 @@ #include "app/ui/select_shortcut.h" #include "app/ui/separator_in_view.h" #include "app/ui/skin/skin_theme.h" -#include "base/fs.h" #include "base/pi.h" #include "base/scoped_value.h" -#include "base/split_string.h" -#include "base/string.h" #include "ui/alert.h" #include "ui/fit_bounds.h" #include "ui/graphics.h" #include "ui/listitem.h" #include "ui/message.h" #include "ui/paint_event.h" -#include "ui/resize_event.h" #include "ui/separator.h" #include "ui/size_hint_event.h" #include "ui/splitter.h" -#include "ui/system.h" #include "keyboard_shortcuts.xml.h" diff --git a/src/app/commands/cmd_layer_from_background.cpp b/src/app/commands/cmd_layer_from_background.cpp index 8fd0b12a3..38a9f6df5 100644 --- a/src/app/commands/cmd_layer_from_background.cpp +++ b/src/app/commands/cmd_layer_from_background.cpp @@ -14,8 +14,6 @@ #include "app/context_access.h" #include "app/modules/gui.h" #include "app/tx.h" -#include "doc/layer.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_layer_lock.cpp b/src/app/commands/cmd_layer_lock.cpp index f21f21e62..cc6f421b6 100644 --- a/src/app/commands/cmd_layer_lock.cpp +++ b/src/app/commands/cmd_layer_lock.cpp @@ -9,11 +9,9 @@ #include "config.h" #endif -#include "app/app.h" #include "app/commands/command.h" #include "app/context_access.h" #include "app/modules/gui.h" -#include "doc/image.h" #include "doc/layer.h" namespace app { diff --git a/src/app/commands/cmd_layer_opacity.cpp b/src/app/commands/cmd_layer_opacity.cpp index 4438d8e65..92c5aeec4 100644 --- a/src/app/commands/cmd_layer_opacity.cpp +++ b/src/app/commands/cmd_layer_opacity.cpp @@ -9,7 +9,6 @@ #include "config.h" #endif -#include "app/app.h" #include "app/cmd/set_layer_opacity.h" #include "app/commands/command.h" #include "app/commands/params.h" diff --git a/src/app/commands/cmd_layer_properties.cpp b/src/app/commands/cmd_layer_properties.cpp index aba78887b..869a9b897 100644 --- a/src/app/commands/cmd_layer_properties.cpp +++ b/src/app/commands/cmd_layer_properties.cpp @@ -34,7 +34,6 @@ #include "app/ui_context.h" #include "base/convert_to.h" #include "base/scoped_value.h" -#include "doc/image.h" #include "doc/layer.h" #include "doc/layer_tilemap.h" #include "doc/sprite.h" diff --git a/src/app/commands/cmd_layer_visibility.cpp b/src/app/commands/cmd_layer_visibility.cpp index 876c7e811..c812b03b1 100644 --- a/src/app/commands/cmd_layer_visibility.cpp +++ b/src/app/commands/cmd_layer_visibility.cpp @@ -12,7 +12,6 @@ #include "app/commands/command.h" #include "app/context_access.h" #include "app/modules/gui.h" -#include "doc/image.h" #include "doc/layer.h" namespace app { diff --git a/src/app/commands/cmd_link_cels.cpp b/src/app/commands/cmd_link_cels.cpp index d07ea5218..4d46093d9 100644 --- a/src/app/commands/cmd_link_cels.cpp +++ b/src/app/commands/cmd_link_cels.cpp @@ -18,7 +18,6 @@ #include "app/ui/status_bar.h" #include "doc/cel.h" #include "doc/layer.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_mask_by_color.cpp b/src/app/commands/cmd_mask_by_color.cpp index 9bb5d0d67..ff94ef176 100644 --- a/src/app/commands/cmd_mask_by_color.cpp +++ b/src/app/commands/cmd_mask_by_color.cpp @@ -15,7 +15,6 @@ #include "app/color_utils.h" #include "app/commands/command.h" #include "app/commands/new_params.h" -#include "app/console.h" #include "app/context.h" #include "app/context_access.h" #include "app/doc.h" @@ -26,9 +25,6 @@ #include "app/ui/color_bar.h" #include "app/ui/color_button.h" #include "app/ui/selection_mode_field.h" -#include "base/chrono.h" -#include "base/convert_to.h" -#include "base/scoped_value.h" #include "doc/image.h" #include "doc/mask.h" #include "doc/sprite.h" diff --git a/src/app/commands/cmd_mask_content.cpp b/src/app/commands/cmd_mask_content.cpp index e4a8decc4..fca54afb5 100644 --- a/src/app/commands/cmd_mask_content.cpp +++ b/src/app/commands/cmd_mask_content.cpp @@ -25,7 +25,6 @@ #include "doc/image.h" #include "doc/layer.h" #include "doc/mask.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_merge_down_layer.cpp b/src/app/commands/cmd_merge_down_layer.cpp index 604c0ffc4..a86933f88 100644 --- a/src/app/commands/cmd_merge_down_layer.cpp +++ b/src/app/commands/cmd_merge_down_layer.cpp @@ -13,16 +13,12 @@ #include "app/cmd/flatten_layers.h" #include "app/commands/command.h" #include "app/context_access.h" -#include "app/doc.h" -#include "app/doc_api.h" #include "app/doc_range.h" #include "app/modules/gui.h" #include "app/pref/preferences.h" #include "app/tx.h" -#include "doc/blend_internals.h" #include "doc/layer.h" #include "doc/sprite.h" -#include "ui/ui.h" namespace app { diff --git a/src/app/commands/cmd_modify_selection.cpp b/src/app/commands/cmd_modify_selection.cpp index 7f8bb7b26..6c45c3821 100644 --- a/src/app/commands/cmd_modify_selection.cpp +++ b/src/app/commands/cmd_modify_selection.cpp @@ -18,16 +18,12 @@ #include "app/modules/gui.h" #include "app/pref/preferences.h" #include "app/tx.h" -#include "base/convert_to.h" #include "doc/algorithm/modify_selection.h" #include "doc/brush_type.h" #include "doc/mask.h" -#include "filters/neighboring_pixels.h" #include "modify_selection.xml.h" -#include - namespace app { using namespace doc; diff --git a/src/app/commands/cmd_move_cel.cpp b/src/app/commands/cmd_move_cel.cpp index 380467ad4..deef6f985 100644 --- a/src/app/commands/cmd_move_cel.cpp +++ b/src/app/commands/cmd_move_cel.cpp @@ -12,7 +12,6 @@ #include "app/commands/command.h" #include "app/context_access.h" #include "app/ui/timeline/timeline.h" -#include "ui/base.h" namespace app { diff --git a/src/app/commands/cmd_move_mask.cpp b/src/app/commands/cmd_move_mask.cpp index ccc88e033..d78822511 100644 --- a/src/app/commands/cmd_move_mask.cpp +++ b/src/app/commands/cmd_move_mask.cpp @@ -18,15 +18,11 @@ #include "app/doc_api.h" #include "app/i18n/strings.h" #include "app/modules/gui.h" -#include "app/pref/preferences.h" #include "app/tx.h" #include "app/ui/doc_view.h" #include "app/ui/editor/editor.h" #include "app/ui_context.h" -#include "base/convert_to.h" #include "doc/mask.h" -#include "doc/sprite.h" -#include "ui/view.h" namespace app { diff --git a/src/app/commands/cmd_new_frame.cpp b/src/app/commands/cmd_new_frame.cpp index 3164e3704..a9714b2f4 100644 --- a/src/app/commands/cmd_new_frame.cpp +++ b/src/app/commands/cmd_new_frame.cpp @@ -10,28 +10,18 @@ #endif #include "app/app.h" -#include "app/color.h" #include "app/commands/command.h" #include "app/commands/params.h" -#include "app/console.h" #include "app/context_access.h" #include "app/doc_api.h" #include "app/i18n/strings.h" #include "app/modules/gui.h" #include "app/tx.h" -#include "app/ui/doc_view.h" -#include "app/ui/editor/editor.h" #include "app/ui/main_window.h" #include "app/ui/status_bar.h" #include "app/ui/timeline/timeline.h" -#include "app/ui_context.h" -#include "doc/cel.h" -#include "doc/image.h" #include "doc/layer.h" #include "doc/sprite.h" -#include "ui/ui.h" - -#include namespace app { diff --git a/src/app/commands/cmd_new_frame_tag.cpp b/src/app/commands/cmd_new_frame_tag.cpp index 63dfab11f..9d84e09f6 100644 --- a/src/app/commands/cmd_new_frame_tag.cpp +++ b/src/app/commands/cmd_new_frame_tag.cpp @@ -9,7 +9,6 @@ #include "config.h" #endif -#include "app/app.h" #include "app/cmd/add_tag.h" #include "app/commands/command.h" #include "app/context.h" @@ -18,8 +17,6 @@ #include "app/ui/tag_window.h" #include "doc/tag.h" -#include - namespace app { using namespace doc; diff --git a/src/app/commands/cmd_new_layer.cpp b/src/app/commands/cmd_new_layer.cpp index 6e92cd78e..2a610996f 100644 --- a/src/app/commands/cmd_new_layer.cpp +++ b/src/app/commands/cmd_new_layer.cpp @@ -21,9 +21,7 @@ #include "app/console.h" #include "app/context_access.h" #include "app/doc_api.h" -#include "app/find_widget.h" #include "app/i18n/strings.h" -#include "app/load_widget.h" #include "app/modules/gui.h" #include "app/pref/preferences.h" #include "app/restore_visible_layers.h" @@ -48,7 +46,6 @@ #include "new_layer.xml.h" #include -#include #include #include diff --git a/src/app/commands/cmd_new_sprite_from_selection.cpp b/src/app/commands/cmd_new_sprite_from_selection.cpp index 4b1449506..7d84008de 100644 --- a/src/app/commands/cmd_new_sprite_from_selection.cpp +++ b/src/app/commands/cmd_new_sprite_from_selection.cpp @@ -23,8 +23,6 @@ #include "doc/sprite.h" #include "fmt/format.h" -#include - namespace app { using namespace doc; diff --git a/src/app/commands/cmd_onionskin.cpp b/src/app/commands/cmd_onionskin.cpp index 9607fad80..6721896d3 100644 --- a/src/app/commands/cmd_onionskin.cpp +++ b/src/app/commands/cmd_onionskin.cpp @@ -8,7 +8,6 @@ #include "config.h" #endif -#include "app/app.h" #include "app/commands/command.h" #include "app/context.h" #include "app/doc.h" diff --git a/src/app/commands/cmd_open_file.cpp b/src/app/commands/cmd_open_file.cpp index c25d06831..c52089ebf 100644 --- a/src/app/commands/cmd_open_file.cpp +++ b/src/app/commands/cmd_open_file.cpp @@ -19,14 +19,12 @@ #include "app/file/file.h" #include "app/file_selector.h" #include "app/i18n/strings.h" -#include "app/modules/gui.h" #include "app/pref/preferences.h" #include "app/recent_files.h" #include "app/ui/status_bar.h" #include "app/ui_context.h" #include "app/util/open_file_job.h" #include "base/fs.h" -#include "base/thread.h" #include "doc/sprite.h" #include "ui/ui.h" diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp index 1a0925d5c..2b4511c8e 100644 --- a/src/app/commands/cmd_options.cpp +++ b/src/app/commands/cmd_options.cpp @@ -37,7 +37,6 @@ #include "app/ui/sampling_selector.h" #include "app/ui/separator_in_view.h" #include "app/ui/skin/skin_theme.h" -#include "app/util/render_text.h" #include "base/convert_to.h" #include "base/fs.h" #include "base/string.h" diff --git a/src/app/commands/cmd_palette_size.cpp b/src/app/commands/cmd_palette_size.cpp index b98f47deb..79e2966ef 100644 --- a/src/app/commands/cmd_palette_size.cpp +++ b/src/app/commands/cmd_palette_size.cpp @@ -15,7 +15,6 @@ #include "app/context_access.h" #include "app/tx.h" #include "doc/palette.h" -#include "doc/sprite.h" #include "palette_size.xml.h" diff --git a/src/app/commands/cmd_paste_text.cpp b/src/app/commands/cmd_paste_text.cpp index d5620d6f3..cce0b53e7 100644 --- a/src/app/commands/cmd_paste_text.cpp +++ b/src/app/commands/cmd_paste_text.cpp @@ -15,16 +15,12 @@ #include "app/console.h" #include "app/context.h" #include "app/pref/preferences.h" -#include "app/ui/drop_down_button.h" #include "app/ui/editor/editor.h" #include "app/ui/timeline/timeline.h" #include "app/util/render_text.h" -#include "base/fs.h" -#include "base/string.h" #include "doc/image.h" #include "doc/image_ref.h" #include "render/dithering.h" -#include "render/ordered_dither.h" #include "render/quantization.h" #include "ui/manager.h" diff --git a/src/app/commands/cmd_pixel_perfect_mode.cpp b/src/app/commands/cmd_pixel_perfect_mode.cpp index e17858fa4..38ea1c9ac 100644 --- a/src/app/commands/cmd_pixel_perfect_mode.cpp +++ b/src/app/commands/cmd_pixel_perfect_mode.cpp @@ -10,8 +10,6 @@ #include "app/app.h" #include "app/commands/command.h" -#include "app/commands/params.h" -#include "app/context.h" #include "app/pref/preferences.h" #include "app/tools/freehand_algorithm.h" #include "app/tools/tool.h" diff --git a/src/app/commands/cmd_refresh.cpp b/src/app/commands/cmd_refresh.cpp index da6269f07..b1320fd32 100644 --- a/src/app/commands/cmd_refresh.cpp +++ b/src/app/commands/cmd_refresh.cpp @@ -10,12 +10,10 @@ #endif #include "app/app.h" -#include "app/app_menus.h" #include "app/commands/command.h" #include "app/ui/main_menu_bar.h" #include "app/ui/main_window.h" #include "app/ui/status_bar.h" -#include "fmt/format.h" #include "ui/scale.h" #include "ui/system.h" #include "ui/theme.h" diff --git a/src/app/commands/cmd_remove_frame.cpp b/src/app/commands/cmd_remove_frame.cpp index 6a79aae8a..da31a5625 100644 --- a/src/app/commands/cmd_remove_frame.cpp +++ b/src/app/commands/cmd_remove_frame.cpp @@ -16,7 +16,6 @@ #include "app/modules/gui.h" #include "app/tx.h" #include "doc/sprite.h" -#include "ui/ui.h" namespace app { diff --git a/src/app/commands/cmd_remove_frame_tag.cpp b/src/app/commands/cmd_remove_frame_tag.cpp index 7a6295430..4f4209404 100644 --- a/src/app/commands/cmd_remove_frame_tag.cpp +++ b/src/app/commands/cmd_remove_frame_tag.cpp @@ -15,7 +15,6 @@ #include "app/commands/params.h" #include "app/context.h" #include "app/context_access.h" -#include "app/loop_tag.h" #include "app/tx.h" #include "app/ui/timeline/timeline.h" #include "base/convert_to.h" diff --git a/src/app/commands/cmd_remove_slice.cpp b/src/app/commands/cmd_remove_slice.cpp index c1be6bce8..a4c4f25c8 100644 --- a/src/app/commands/cmd_remove_slice.cpp +++ b/src/app/commands/cmd_remove_slice.cpp @@ -15,14 +15,12 @@ #include "app/commands/command.h" #include "app/context_access.h" #include "app/i18n/strings.h" -#include "app/modules/gui.h" #include "app/tx.h" #include "app/ui/status_bar.h" #include "base/convert_to.h" #include "doc/selected_objects.h" #include "doc/slice.h" #include "doc/sprite.h" -#include "ui/alert.h" #include "ui/widget.h" namespace app { diff --git a/src/app/commands/cmd_reopen_closed_file.cpp b/src/app/commands/cmd_reopen_closed_file.cpp index f25899073..a8f22a7f1 100644 --- a/src/app/commands/cmd_reopen_closed_file.cpp +++ b/src/app/commands/cmd_reopen_closed_file.cpp @@ -8,14 +8,10 @@ #include "config.h" #endif -#include "app/app.h" #include "app/commands/command.h" #include "app/commands/commands.h" -#include "app/doc.h" #include "app/ui_context.h" -#include - namespace app { class ReopenClosedFileCommand : public Command { diff --git a/src/app/commands/cmd_reselect_mask.cpp b/src/app/commands/cmd_reselect_mask.cpp index 65e20ab3a..396729ba7 100644 --- a/src/app/commands/cmd_reselect_mask.cpp +++ b/src/app/commands/cmd_reselect_mask.cpp @@ -15,7 +15,6 @@ #include "app/modules/gui.h" #include "app/tx.h" #include "doc/mask.h" -#include "doc/sprite.h" namespace app { diff --git a/src/app/commands/cmd_rotate.cpp b/src/app/commands/cmd_rotate.cpp index f4a60f51c..bbd284f3b 100644 --- a/src/app/commands/cmd_rotate.cpp +++ b/src/app/commands/cmd_rotate.cpp @@ -14,13 +14,11 @@ #include "app/commands/cmd_rotate.h" #include "app/commands/params.h" #include "app/doc_api.h" -#include "app/doc_range.h" #include "app/i18n/strings.h" #include "app/modules/gui.h" #include "app/sprite_job.h" #include "app/tools/tool_box.h" #include "app/tx.h" -#include "app/ui/color_bar.h" #include "app/ui/editor/editor.h" #include "app/ui/status_bar.h" #include "app/ui/timeline/timeline.h" @@ -31,7 +29,6 @@ #include "doc/image.h" #include "doc/mask.h" #include "doc/sprite.h" -#include "ui/ui.h" namespace app { @@ -190,7 +187,7 @@ void RotateCommand::onLoadParams(const Params& params) bool RotateCommand::onEnabled(Context* context) { - // Because we use the toolbox & editor to transform the selection, this won't work without a UI + // Because we use the toolbar & editor to transform the selection, this won't work without a UI if (m_flipMask && !context->isUIAvailable()) return false; diff --git a/src/app/commands/cmd_run_script.cpp b/src/app/commands/cmd_run_script.cpp index 0bd95dea8..721d94ef7 100644 --- a/src/app/commands/cmd_run_script.cpp +++ b/src/app/commands/cmd_run_script.cpp @@ -16,7 +16,6 @@ #include "app/app.h" #include "app/commands/command.h" #include "app/commands/params.h" -#include "app/console.h" #include "app/context.h" #include "app/i18n/strings.h" #include "app/pref/preferences.h" @@ -27,8 +26,6 @@ #include "fmt/format.h" #include "ui/manager.h" -#include - namespace app { class RunScriptCommand : public Command { diff --git a/src/app/commands/cmd_save_file.cpp b/src/app/commands/cmd_save_file.cpp index 235a861c5..51b0e53fe 100644 --- a/src/app/commands/cmd_save_file.cpp +++ b/src/app/commands/cmd_save_file.cpp @@ -36,8 +36,6 @@ #include "app/ui/status_bar.h" #include "base/convert_to.h" #include "base/fs.h" -#include "base/scoped_value.h" -#include "base/thread.h" #include "doc/mask.h" #include "doc/sprite.h" #include "doc/tag.h" diff --git a/src/app/commands/cmd_save_mask.cpp b/src/app/commands/cmd_save_mask.cpp index a55cb9df7..893d0e469 100644 --- a/src/app/commands/cmd_save_mask.cpp +++ b/src/app/commands/cmd_save_mask.cpp @@ -15,9 +15,6 @@ #include "app/i18n/strings.h" #include "app/util/msk_file.h" #include "base/fs.h" -#include "doc/file/act_file.h" -#include "doc/mask.h" -#include "doc/sprite.h" #include "new_params.h" #include "ui/alert.h" @@ -67,8 +64,8 @@ void SaveMaskCommand::onExecute(Context* context) filename = selFilename.front(); } - const bool result = save_msk_file(document->mask(), filename.c_str()) != 0; - if (result && ui) + const bool result = (save_msk_file(document->mask(), filename.c_str()) == 0); + if (!result && ui) ui::Alert::show(Strings::alerts_error_saving_file(filename)); } diff --git a/src/app/commands/cmd_save_palette.cpp b/src/app/commands/cmd_save_palette.cpp index 88c1672d6..f7ee247b5 100644 --- a/src/app/commands/cmd_save_palette.cpp +++ b/src/app/commands/cmd_save_palette.cpp @@ -10,7 +10,6 @@ #endif #include "app/app.h" -#include "app/commands/cmd_set_palette.h" #include "app/commands/commands.h" #include "app/commands/params.h" #include "app/context.h" @@ -20,7 +19,6 @@ #include "app/i18n/strings.h" #include "app/modules/palettes.h" #include "base/fs.h" -#include "doc/palette.h" #include "new_params.h" #include "ui/alert.h" diff --git a/src/app/commands/cmd_scroll.cpp b/src/app/commands/cmd_scroll.cpp index 7764a5604..eb7484609 100644 --- a/src/app/commands/cmd_scroll.cpp +++ b/src/app/commands/cmd_scroll.cpp @@ -12,11 +12,9 @@ #include "app/app.h" #include "app/commands/command.h" #include "app/commands/move_thing.h" -#include "app/commands/params.h" #include "app/context_access.h" #include "app/i18n/strings.h" #include "app/ui/editor/editor.h" -#include "base/convert_to.h" #include "ui/view.h" namespace app { diff --git a/src/app/commands/cmd_scroll_center.cpp b/src/app/commands/cmd_scroll_center.cpp index 93d709865..b39d9ce69 100644 --- a/src/app/commands/cmd_scroll_center.cpp +++ b/src/app/commands/cmd_scroll_center.cpp @@ -11,7 +11,6 @@ #include "app/app.h" #include "app/commands/command.h" -#include "app/context_access.h" #include "app/ui/editor/editor.h" namespace app { diff --git a/src/app/commands/cmd_select_palette.cpp b/src/app/commands/cmd_select_palette.cpp index a21fdb1aa..a5d7a7954 100644 --- a/src/app/commands/cmd_select_palette.cpp +++ b/src/app/commands/cmd_select_palette.cpp @@ -17,7 +17,6 @@ #include "app/modules/palettes.h" #include "app/site.h" #include "doc/cel.h" -#include "doc/frame_range.h" #include "doc/image.h" #include "doc/layer.h" #include "doc/layer_tilemap.h" diff --git a/src/app/commands/cmd_select_tile.cpp b/src/app/commands/cmd_select_tile.cpp index 65c4b6b44..751126cef 100644 --- a/src/app/commands/cmd_select_tile.cpp +++ b/src/app/commands/cmd_select_tile.cpp @@ -19,7 +19,6 @@ #include "app/tx.h" #include "app/ui/editor/editor.h" #include "doc/mask.h" -#include "ui/system.h" namespace app { diff --git a/src/app/commands/cmd_set_palette.cpp b/src/app/commands/cmd_set_palette.cpp index cdecc38ea..bb482333a 100644 --- a/src/app/commands/cmd_set_palette.cpp +++ b/src/app/commands/cmd_set_palette.cpp @@ -12,7 +12,6 @@ #include "app/context_access.h" #include "app/doc_api.h" #include "app/file_selector.h" -#include "app/ini_file.h" #include "app/modules/palettes.h" #include "app/tx.h" #include "doc/palette.h" diff --git a/src/app/commands/cmd_set_same_ink.cpp b/src/app/commands/cmd_set_same_ink.cpp index ffdcc424b..7377c1874 100644 --- a/src/app/commands/cmd_set_same_ink.cpp +++ b/src/app/commands/cmd_set_same_ink.cpp @@ -11,7 +11,6 @@ #include "app/app.h" #include "app/commands/command.h" #include "app/commands/commands.h" -#include "app/commands/params.h" #include "app/pref/preferences.h" #include "app/tools/tool.h" #include "app/tools/tool_box.h" diff --git a/src/app/commands/cmd_sprite_properties.cpp b/src/app/commands/cmd_sprite_properties.cpp index 3667e7d83..900acfbfb 100644 --- a/src/app/commands/cmd_sprite_properties.cpp +++ b/src/app/commands/cmd_sprite_properties.cpp @@ -30,7 +30,6 @@ #include "app/util/pixel_ratio.h" #include "app/util/tileset_utils.h" #include "base/mem_utils.h" -#include "doc/image.h" #include "doc/palette.h" #include "doc/sprite.h" #include "doc/tilesets.h" diff --git a/src/app/commands/cmd_swap_checkerboard_colors.cpp b/src/app/commands/cmd_swap_checkerboard_colors.cpp index cc0360f7e..37939e0a2 100644 --- a/src/app/commands/cmd_swap_checkerboard_colors.cpp +++ b/src/app/commands/cmd_swap_checkerboard_colors.cpp @@ -8,11 +8,9 @@ #include "config.h" #endif -#include "app/app.h" #include "app/commands/command.h" #include "app/context.h" #include "app/ui/editor/editor.h" -#include "ui/base.h" namespace app { diff --git a/src/app/commands/cmd_switch_colors.cpp b/src/app/commands/cmd_switch_colors.cpp index 42345cea3..514685a73 100644 --- a/src/app/commands/cmd_switch_colors.cpp +++ b/src/app/commands/cmd_switch_colors.cpp @@ -14,7 +14,6 @@ #include "app/ui/color_bar.h" #include "app/ui/context_bar.h" #include "app/ui/editor/editor.h" -#include "ui/base.h" namespace app { diff --git a/src/app/commands/cmd_symmetry_mode.cpp b/src/app/commands/cmd_symmetry_mode.cpp index a9222988a..8adb69eaf 100644 --- a/src/app/commands/cmd_symmetry_mode.cpp +++ b/src/app/commands/cmd_symmetry_mode.cpp @@ -15,10 +15,8 @@ #include "app/context.h" #include "app/doc.h" #include "app/i18n/strings.h" -#include "app/modules/gui.h" #include "app/pref/preferences.h" #include "app/ui/context_bar.h" -#include "app/ui_context.h" namespace app { diff --git a/src/app/commands/cmd_toggle_timeline_thumbnails.cpp b/src/app/commands/cmd_toggle_timeline_thumbnails.cpp index 20f1baef2..b81bcb7d6 100644 --- a/src/app/commands/cmd_toggle_timeline_thumbnails.cpp +++ b/src/app/commands/cmd_toggle_timeline_thumbnails.cpp @@ -10,7 +10,6 @@ #include "config.h" #endif -#include "app/app.h" #include "app/commands/command.h" #include "app/context.h" #include "app/doc.h" diff --git a/src/app/commands/cmd_undo.cpp b/src/app/commands/cmd_undo.cpp index 4241cff0b..0bf9d38d1 100644 --- a/src/app/commands/cmd_undo.cpp +++ b/src/app/commands/cmd_undo.cpp @@ -23,7 +23,6 @@ #include "base/thread.h" #include "doc/sprite.h" #include "ui/manager.h" -#include "ui/system.h" namespace app { diff --git a/src/app/commands/cmd_undo_history.cpp b/src/app/commands/cmd_undo_history.cpp index 36022196a..c02f51036 100644 --- a/src/app/commands/cmd_undo_history.cpp +++ b/src/app/commands/cmd_undo_history.cpp @@ -30,8 +30,6 @@ #include "base/mem_utils.h" #include "fmt/format.h" #include "text/font_metrics.h" -#include "ui/init_theme_event.h" -#include "ui/listitem.h" #include "ui/message.h" #include "ui/paint_event.h" #include "ui/scale.h" diff --git a/src/app/commands/cmd_unlink_cel.cpp b/src/app/commands/cmd_unlink_cel.cpp index 1bf1d6240..61e82e642 100644 --- a/src/app/commands/cmd_unlink_cel.cpp +++ b/src/app/commands/cmd_unlink_cel.cpp @@ -19,7 +19,6 @@ #include "app/ui/status_bar.h" #include "doc/cel.h" #include "doc/layer.h" -#include "doc/sprite.h" namespace app {