3976 |
find(children.begin(), children.end(), item); |
find(children.begin(), children.end(), item); |
3977 |
if (it != children.end()) { |
if (it != children.end()) { |
3978 |
int index = it - children.begin(); |
int index = it - children.begin(); |
3979 |
m_TreeViewInstruments.get_selection()->select(Gtk::TreePath(ToString(index))); |
|
3980 |
|
// convert index of model to index of visual presentation (i.e. if filtered) |
3981 |
|
Gtk::TreeModel::Path path = m_refInstrumentsModelFilter->convert_child_path_to_path(Gtk::TreePath(ToString(index))); |
3982 |
|
|
3983 |
|
if (path) |
3984 |
|
m_TreeViewInstruments.get_selection()->select(path); |
3985 |
|
else |
3986 |
|
m_TreeViewInstruments.get_selection()->unselect_all(); |
3987 |
|
|
3988 |
m_RegionChooser.set_instrument(file->GetInstrument(index)); |
m_RegionChooser.set_instrument(file->GetInstrument(index)); |
3989 |
} |
} |