Skip to content
Snippets Groups Projects
Commit 9a103a23 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

respect single instrument mode in InstrumentView

parent 3df039a4
No related branches found
No related tags found
1 merge request!712UI improvements
......@@ -56,9 +56,13 @@ InstrumentView::InstrumentView(QWidget* parent, ProjectDocument* document)
mainLayout->addLayout(horizontalLayout);
createWidgetsForCurrentInstrument();
updateSingleInstrumentMode();
connect(m_instrumentListView, &InstrumentListView::instrumentSelected, this,
&InstrumentView::createWidgetsForCurrentInstrument);
connect(m_document, &ProjectDocument::singleInstrumentModeChanged, this,
&InstrumentView::updateSingleInstrumentMode);
}
void InstrumentView::showEvent(QShowEvent*)
......@@ -168,3 +172,8 @@ void InstrumentView::onInstrumentChangedFromExternal(const InstrumentItem* instr
if (instrument == m_instrumentListView->currentInstrument())
createWidgetsForCurrentInstrument();
}
void InstrumentView::updateSingleInstrumentMode()
{
m_instrumentListView->setVisible(!m_document->singleInstrumentMode());
}
......@@ -40,6 +40,7 @@ private:
void onInstrumentdescriptionEdited(const QString& t);
void onInstrumentChangedByEditor();
void onInstrumentChangedFromExternal(const InstrumentItem* instrument);
void updateSingleInstrumentMode();
private:
InstrumentListView* m_instrumentListView;
......
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