--- gigedit/trunk/src/gigedit/mainwindow.cpp 2020/08/14 12:04:15 3812 +++ gigedit/trunk/src/gigedit/mainwindow.cpp 2020/08/14 12:18:26 3813 @@ -5156,7 +5156,9 @@ Glib::RefPtr sel = m_TreeViewInstruments.get_selection(); std::vector rows = sel->get_selected_rows(); if (!rows.empty()) { - Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(rows[0]); + // convert index of visual selection (i.e. if filtered) to index of model + Gtk::TreeModel::Path path = m_refInstrumentsModelFilter->convert_path_to_child_path(rows[0]); + Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(path); if (it) { Gtk::TreeModel::Row row = *it; src = row[m_InstrumentsModel.m_col_instr]; @@ -5184,6 +5186,10 @@ const bool found = m_TreeViewInstruments.get_path_at_pos(x, y, path); if (!found) return; + // convert index of visual selection (i.e. if filtered) to index of model + path = m_refInstrumentsModelFilter->convert_path_to_child_path(path); + if (!path) return; + Gtk::TreeModel::iterator iter = m_refInstrumentsTreeModel->get_iter(path); if (!iter) return; Gtk::TreeModel::Row row = *iter;