3614 |
{ |
{ |
3615 |
instrumentProps.signal_name_changed().clear(); |
instrumentProps.signal_name_changed().clear(); |
3616 |
|
|
3617 |
|
// get visual selection |
3618 |
std::vector<Gtk::TreeModel::Path> rows = m_TreeViewInstruments.get_selection()->get_selected_rows(); |
std::vector<Gtk::TreeModel::Path> rows = m_TreeViewInstruments.get_selection()->get_selected_rows(); |
3619 |
if (rows.empty()) { |
if (rows.empty()) { |
3620 |
instrumentProps.hide(); |
instrumentProps.hide(); |
3621 |
return false; |
return false; |
3622 |
} |
} |
3623 |
|
|
3624 |
|
// convert index of visual selection (i.e. if filtered) to index of model |
3625 |
|
Gtk::TreeModel::Path path = m_refInstrumentsModelFilter->convert_path_to_child_path(rows[0]); |
3626 |
|
|
3627 |
//NOTE: was const_iterator before, which did not compile with GTKMM4 development branch, probably going to be fixed before final GTKMM4 release though. |
//NOTE: was const_iterator before, which did not compile with GTKMM4 development branch, probably going to be fixed before final GTKMM4 release though. |
3628 |
Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(rows[0]); |
Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(path); |
3629 |
if (it) { |
if (it) { |
3630 |
Gtk::TreeModel::Row row = *it; |
Gtk::TreeModel::Row row = *it; |
3631 |
gig::Instrument* instrument = row[m_InstrumentsModel.m_col_instr]; |
gig::Instrument* instrument = row[m_InstrumentsModel.m_col_instr]; |