From 590ed272113fd85c9356416fe4967a9d5350af19 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Tue, 16 Jan 2024 14:36:29 +0100
Subject: [PATCH] + 1

---
 GUI/View/Frame/MaskEditingFrame.cpp  | 2 +-
 GUI/View/Setup/MaskEditorActions.cpp | 3 ---
 GUI/View/Setup/MaskEditorActions.h   | 3 ---
 GUI/View/Setup/MaskToolbar.cpp       | 5 +----
 4 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/GUI/View/Frame/MaskEditingFrame.cpp b/GUI/View/Frame/MaskEditingFrame.cpp
index 5a340ca0d4e..2c8d83a9f79 100644
--- a/GUI/View/Frame/MaskEditingFrame.cpp
+++ b/GUI/View/Frame/MaskEditingFrame.cpp
@@ -82,7 +82,7 @@ MaskEditingFrame::MaskEditingFrame(QWidget* parent)
     connect(m_actions->save_plot, &QAction::triggered, m_canvas2D,
             &MaskEditorCanvas::onSavePlotRequest);
 
-    connect(m_actions, &MaskEditorActions::propertyPanelRequest,
+    connect(m_actions->toggle_panel, &QAction::triggered,
             [this] { m_panel->setPanelHidden(!m_panel->isHidden()); });
 
     connect(toolbar, &MaskToolbar::activityChanged, m_canvas2D->getScene(),
diff --git a/GUI/View/Setup/MaskEditorActions.cpp b/GUI/View/Setup/MaskEditorActions.cpp
index ddd36a894f7..941f0367589 100644
--- a/GUI/View/Setup/MaskEditorActions.cpp
+++ b/GUI/View/Setup/MaskEditorActions.cpp
@@ -53,9 +53,6 @@ MaskEditorActions::MaskEditorActions()
     save_plot->setText("Save");
     save_plot->setIcon(QIcon(":/images/content-save-outline.svg"));
     save_plot->setToolTip("Save Plot");
-
-
-    connect(toggle_panel, &QAction::triggered, this, &MaskEditorActions::propertyPanelRequest);
 }
 
 void MaskEditorActions::setModels(MaskeditorListmodel* mask_list_model)
diff --git a/GUI/View/Setup/MaskEditorActions.h b/GUI/View/Setup/MaskEditorActions.h
index 749b4ab6eef..eb2dc2583b1 100644
--- a/GUI/View/Setup/MaskEditorActions.h
+++ b/GUI/View/Setup/MaskEditorActions.h
@@ -46,9 +46,6 @@ public:
     QAction* sendToBackAction() { return send_to_back; }
     QAction* bringToFrontAction() { return bring_to_front; }
 
-signals:
-    void propertyPanelRequest();
-
 public slots:
     void onItemContextMenuRequest(const QPoint& point);
 
diff --git a/GUI/View/Setup/MaskToolbar.cpp b/GUI/View/Setup/MaskToolbar.cpp
index 0ec6ab57c6b..df0bdb0b82d 100644
--- a/GUI/View/Setup/MaskToolbar.cpp
+++ b/GUI/View/Setup/MaskToolbar.cpp
@@ -134,12 +134,9 @@ MaskToolbar::MaskToolbar(MaskEditorActions* actions)
     connect(presentationButton, &QToolButton::released, [this] { emit presentationChange(false); });
 
     auto* propertyPanelButton = new QToolButton(this);
-    propertyPanelButton->setIcon(QIcon(":/images/maskeditor_toolpanel.svg"));
-    propertyPanelButton->setToolTip("Open panel with additional properties");
+    propertyPanelButton->setDefaultAction(actions->toggle_panel);
     addWidget(propertyPanelButton);
 
-    connect(propertyPanelButton, &QToolButton::clicked, actions,
-            &MaskEditorActions::propertyPanelRequest);
     addSeparator();
 }
 
-- 
GitLab