diff --git a/GUI/View/List/InstrumentsQListView.cpp b/GUI/View/List/InstrumentsQListView.cpp index 66ced96e8f93a695d74ae1fbab78a2d9ca906eb9..8a02d5e61ccc8f466587abe470d3a23da70b35ee 100644 --- a/GUI/View/List/InstrumentsQListView.cpp +++ b/GUI/View/List/InstrumentsQListView.cpp @@ -119,17 +119,17 @@ void InstrumentsQListView::onCopy() void InstrumentsQListView::onStoreInLibrary() const { QModelIndex idx = selectionModel()->selectedIndexes().front(); - InstrumentItem* ii = m_model->instrumentItemForIndex(idx); - if (!ii) + InstrumentItem* t = m_model->instrumentItemForIndex(idx); + if (!t) return; QString fname = GUI::Dialog::fileSaveDialog("Save instrument", appSettings->xml_dir, - "XML Files (*.xml)", ii->instrumentName() + ".xml"); + "XML Files (*.xml)", t->instrumentName() + ".xml"); if (fname.isEmpty()) return; try { - InstrumentXML::save(fname, ii); + InstrumentXML::save(fname, t); } catch (const std::exception& ex) { QMessageBox(QMessageBox::Warning, "BornAgain: failed saving", QString(ex.what()), QMessageBox::Ok, nullptr)