From c9074479246bed4bfbb0dd45837728db97998a2b Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 26 Feb 2024 09:09:45 +0100 Subject: [PATCH] rm 'slot' --- GUI/View/Views/InstrumentView.cpp | 16 ++++++++-------- GUI/View/Views/InstrumentView.h | 4 +--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/GUI/View/Views/InstrumentView.cpp b/GUI/View/Views/InstrumentView.cpp index fd8e0cddf00..e3560237972 100644 --- a/GUI/View/Views/InstrumentView.cpp +++ b/GUI/View/Views/InstrumentView.cpp @@ -127,6 +127,14 @@ void InstrumentView::setToolbarActions(QToolBar* toolbar) }); } +void InstrumentView::updateActions() +{ + bool enabled = gDoc->instruments()->currentIndex() != size_t(-1); + m_rm_action->setEnabled(enabled); + m_cp_action->setEnabled(enabled); + m_save_action->setEnabled(enabled); +} + void InstrumentView::createWidgetsForCurrentInstrument() { updateActions(); @@ -180,11 +188,3 @@ void InstrumentView::createWidgetsForCurrentInstrument() layout->addWidget(editor); m_scroll_area->setWidget(w); } - -void InstrumentView::updateActions() -{ - bool enabled = gDoc->instruments()->currentIndex() != size_t(-1); - m_rm_action->setEnabled(enabled); - m_cp_action->setEnabled(enabled); - m_save_action->setEnabled(enabled); -} diff --git a/GUI/View/Views/InstrumentView.h b/GUI/View/Views/InstrumentView.h index f3fb69bc0ef..73c4b198fa2 100644 --- a/GUI/View/Views/InstrumentView.h +++ b/GUI/View/Views/InstrumentView.h @@ -29,11 +29,9 @@ class InstrumentView : public QWidget { public: InstrumentView(); -private slots: - void updateActions(); - private: void setToolbarActions(QToolBar* toolbar); + void updateActions(); void createWidgetsForCurrentInstrument(); InstrumentsQModel* m_qlistmodel; -- GitLab