/[svn]/gigedit/trunk/src/gigedit/mainwindow.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/mainwindow.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3812 by schoenebeck, Fri Aug 14 12:04:15 2020 UTC revision 3813 by schoenebeck, Fri Aug 14 12:18:26 2020 UTC
# Line 5156  void MainWindow::on_instruments_treeview Line 5156  void MainWindow::on_instruments_treeview
5156          Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewInstruments.get_selection();          Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewInstruments.get_selection();
5157          std::vector<Gtk::TreeModel::Path> rows = sel->get_selected_rows();          std::vector<Gtk::TreeModel::Path> rows = sel->get_selected_rows();
5158          if (!rows.empty()) {          if (!rows.empty()) {
5159              Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(rows[0]);              // convert index of visual selection (i.e. if filtered) to index of model
5160                Gtk::TreeModel::Path path = m_refInstrumentsModelFilter->convert_path_to_child_path(rows[0]);
5161                Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(path);
5162              if (it) {              if (it) {
5163                  Gtk::TreeModel::Row row = *it;                  Gtk::TreeModel::Row row = *it;
5164                  src = row[m_InstrumentsModel.m_col_instr];                  src = row[m_InstrumentsModel.m_col_instr];
# Line 5184  void MainWindow::on_instruments_treeview Line 5186  void MainWindow::on_instruments_treeview
5186          const bool found = m_TreeViewInstruments.get_path_at_pos(x, y, path);          const bool found = m_TreeViewInstruments.get_path_at_pos(x, y, path);
5187          if (!found) return;          if (!found) return;
5188    
5189            // convert index of visual selection (i.e. if filtered) to index of model
5190            path = m_refInstrumentsModelFilter->convert_path_to_child_path(path);
5191            if (!path) return;
5192    
5193          Gtk::TreeModel::iterator iter = m_refInstrumentsTreeModel->get_iter(path);          Gtk::TreeModel::iterator iter = m_refInstrumentsTreeModel->get_iter(path);
5194          if (!iter) return;          if (!iter) return;
5195          Gtk::TreeModel::Row row = *iter;          Gtk::TreeModel::Row row = *iter;

Legend:
Removed from v.3812  
changed lines
  Added in v.3813

  ViewVC Help
Powered by ViewVC