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

simpler default arg

parent 30ab61b9
No related branches found
No related tags found
1 merge request!2359Use same tree view with delegate for datafiles, samples, and instruments. Also move some code between GUI/View directories. Restore Py wrappers lost in previous MR.
......@@ -126,7 +126,7 @@ QModelIndex InstrumentsQListModel::copyInstrument(const InstrumentItem* source)
const QString copyName = instruments->suggestInstrumentName(source->instrumentName());
const int row = instruments->instrumentItems().size();
beginInsertRows(QModelIndex(), row, row);
beginInsertRows({}, row, row);
InstrumentItem* copy = instruments->insertItemCopy(*source);
copy->setInstrumentName(copyName);
emit instruments->instrumentAddedOrRemoved();
......@@ -141,7 +141,7 @@ template <class Instrument> QModelIndex InstrumentsQListModel::addNewInstrument(
const QString name = instruments->suggestInstrumentName(defaultInstrumentName<Instrument>());
const int row = instruments->instrumentItems().size();
beginInsertRows(QModelIndex(), row, row);
beginInsertRows({}, row, row);
auto* instrument = instruments->addInstrumentItem<Instrument>();
instruments->setInstrumentName(instrument, name);
endInsertRows();
......
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