From 5b6faec867c331631468ae57c29ab39b0ced0ffb Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <svechnikovmv@gmail.com>
Date: Fri, 6 Dec 2024 20:34:09 +0100
Subject: [PATCH] cleanup

---
 GUI/View/Plotter/ColorMap.cpp        | 1 -
 GUI/View/Scene/MaskGraphicsScene.cpp | 4 ++--
 GUI/View/Scene/MaskGraphicsScene.h   | 7 +++----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/GUI/View/Plotter/ColorMap.cpp b/GUI/View/Plotter/ColorMap.cpp
index efa90590723..8889cc227c8 100644
--- a/GUI/View/Plotter/ColorMap.cpp
+++ b/GUI/View/Plotter/ColorMap.cpp
@@ -68,7 +68,6 @@ ColorMap::ColorMap()
 void ColorMap::itemToMap(Data2DItem* item)
 {
     ASSERT(item);
-
     m_data_item = item;
 
     // set nullptr at destruction
diff --git a/GUI/View/Scene/MaskGraphicsScene.cpp b/GUI/View/Scene/MaskGraphicsScene.cpp
index 60b936970e7..34f448b487a 100644
--- a/GUI/View/Scene/MaskGraphicsScene.cpp
+++ b/GUI/View/Scene/MaskGraphicsScene.cpp
@@ -145,7 +145,7 @@ void MaskGraphicsScene::deleteCurrentItem()
     if (!selected_overlay)
         return;
 
-    // To delete the current mask of projection, its overlay MUST be selected!
+    // To delete the current mask or projection, its overlay MUST be selected!
 
     const MaskItem* selected_item = maskItemForOverlay(selected_overlay);
     ASSERT(selected_item);
@@ -153,7 +153,7 @@ void MaskGraphicsScene::deleteCurrentItem()
     MasksSet* current_set = modelOfMaskItem(selected_item);
     ASSERT(current_set->currentItem() == selected_item);
 
-    connectOverlaySelection(false); // do not switch selection while deletion
+    connectOverlaySelection(false); // do not switch selection in the intermediate state
     removeOverlay(current_set->currentItem());
     connectOverlaySelection(true);
     current_set->delete_current();
diff --git a/GUI/View/Scene/MaskGraphicsScene.h b/GUI/View/Scene/MaskGraphicsScene.h
index ad04a86635a..d47ef241863 100644
--- a/GUI/View/Scene/MaskGraphicsScene.h
+++ b/GUI/View/Scene/MaskGraphicsScene.h
@@ -56,6 +56,9 @@ signals:
 
 public slots:
     void onActivityChanged(Canvas2DMode::Flag mode);
+    void onMaskSetChanged();
+    void onProjSetChanged();
+    void onSceneSelectionChanged();
 
 private:
     void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
@@ -80,10 +83,6 @@ private:
     void connectProjSet(bool isConnected);
     void connectOverlaySelection(bool isConnected);
 
-    void onMaskSetChanged();
-    void onProjSetChanged();
-    void onSceneSelectionChanged();
-
     void setDrawingInProgress(bool value);
 
     void selectOnlyItemAtMousePos(QGraphicsSceneMouseEvent* event);
-- 
GitLab