4419 |
Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewInstruments.get_selection(); |
Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewInstruments.get_selection(); |
4420 |
std::vector<Gtk::TreeModel::Path> rows = sel->get_selected_rows(); |
std::vector<Gtk::TreeModel::Path> rows = sel->get_selected_rows(); |
4421 |
for (int r = 0; r < rows.size(); ++r) { |
for (int r = 0; r < rows.size(); ++r) { |
4422 |
Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(rows[r]); |
// convert index of visual selection (i.e. if filtered) to index of model |
4423 |
|
Gtk::TreeModel::Path path = m_refInstrumentsModelFilter->convert_path_to_child_path(rows[r]); |
4424 |
|
Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(path); |
4425 |
if (it) { |
if (it) { |
4426 |
Gtk::TreeModel::Row row = *it; |
Gtk::TreeModel::Row row = *it; |
4427 |
gig::Instrument* instrOrig = row[m_InstrumentsModel.m_col_instr]; |
gig::Instrument* instrOrig = row[m_InstrumentsModel.m_col_instr]; |
4452 |
} |
} |
4453 |
|
|
4454 |
Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewInstruments.get_selection(); |
Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewInstruments.get_selection(); |
4455 |
std::vector<Gtk::TreeModel::Path> rows = sel->get_selected_rows(); |
std::vector<Gtk::TreeModel::Path> rowsVisual = sel->get_selected_rows(); |
4456 |
|
|
4457 |
|
// convert indeces of visual selection (i.e. if filtered) to indeces of model |
4458 |
|
std::vector<Gtk::TreeModel::Path> rows; |
4459 |
|
for (int rv = 0; rv < rowsVisual.size(); ++rv) { |
4460 |
|
Gtk::TreeModel::Path path = m_refInstrumentsModelFilter->convert_path_to_child_path(rowsVisual[rv]); |
4461 |
|
if (path) |
4462 |
|
rows.push_back(path); |
4463 |
|
} |
4464 |
|
|
4465 |
for (int r = rows.size() - 1; r >= 0; --r) { |
for (int r = rows.size() - 1; r >= 0; --r) { |
4466 |
Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(rows[r]); |
Gtk::TreeModel::iterator it = m_refInstrumentsTreeModel->get_iter(rows[r]); |
4467 |
if (!it) continue; |
if (!it) continue; |