diff --git a/GUI/View/Plotter/ColorMap.cpp b/GUI/View/Plotter/ColorMap.cpp index efa90590723901c162505025a53c5affda4573d2..8889cc227c82ea6ff87aad1e49ded458a3f8d837 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 60b936970e75d0e48cc5a250af42396bce10de10..34f448b487a42b2912d27330ece2c28767e8527a 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 ad04a86635a167ce4eed9bcf62b9fea907e087cf..d47ef2418633f9137d2b1ea4d0332aefed06ca5d 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);