Skip to content
Snippets Groups Projects
Commit c9074479 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm 'slot'

parent f243b9cf
No related branches found
No related tags found
1 merge request!2387unify code for list views
......@@ -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);
}
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment