Skip to content
Snippets Groups Projects
Commit 79014111 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

[i514] Explain purpose of 'onInstrumentChangedByEditor' methods (#514) (Closes #514)

Merging branch 'i514'  into 'main'.

See merge request !1449
parents 2d4cfdb5 82321b39
No related branches found
No related tags found
1 merge request!1449Explain purpose of 'onInstrumentChangedByEditor' methods (#514)
Pipeline #91788 passed
...@@ -255,6 +255,8 @@ void InstrumentLibraryEditor::onInstrumentDescriptionEdited(const QString& t) ...@@ -255,6 +255,8 @@ void InstrumentLibraryEditor::onInstrumentDescriptionEdited(const QString& t)
void InstrumentLibraryEditor::onInstrumentChangedByEditor() void InstrumentLibraryEditor::onInstrumentChangedByEditor()
{ {
// uses 'MultiInstrumentNotifier::instrumentChanged' signal to set
// 'InstrumentLibrary:m_modified' flag to true ==> save library on close.
auto* currentInstrument = m_treeModel->itemForIndex(m_ui->treeView->currentIndex()); auto* currentInstrument = m_treeModel->itemForIndex(m_ui->treeView->currentIndex());
m_instrumentLibrary->editController()->notifyInstrumentChanged(currentInstrument); m_instrumentLibrary->editController()->notifyInstrumentChanged(currentInstrument);
} }
......
...@@ -168,6 +168,9 @@ void InstrumentView::onInstrumentdescriptionEdited(const QString& t) ...@@ -168,6 +168,9 @@ void InstrumentView::onInstrumentdescriptionEdited(const QString& t)
void InstrumentView::onInstrumentChangedByEditor() void InstrumentView::onInstrumentChangedByEditor()
{ {
// uses 'MultiInstrumentNotifier::instrumentChanged' signal for two purposes:
// 1) notify 'ProjectDocument' that user has changed data ==> mark project with '*'
// 2) notify 'LinkInstrumentManager' ==> unlink instrument from data if they are incompatible
m_document->multiNotifier()->notifyInstrumentChanged( m_document->multiNotifier()->notifyInstrumentChanged(
m_instrumentListView->currentInstrumentItem()); m_instrumentListView->currentInstrumentItem());
} }
......
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