diff --git a/GUI/View/Views/InstrumentView.cpp b/GUI/View/Views/InstrumentView.cpp index fd8e0cddf00696e610e18ca406293b32e83cb80d..e35602379724cabff9eca6f14313bd670ea1d273 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 f3fb69bc0eff6d93a8af8601a2dd30d4ca79d1ae..73c4b198fa20baf8a8951dd8ded364e592276cf3 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;