45 |
m_treeView.append_column(_("References"), m_columns.m_col_refcount); |
m_treeView.append_column(_("References"), m_columns.m_col_refcount); |
46 |
m_treeView.set_headers_visible(true); |
m_treeView.set_headers_visible(true); |
47 |
m_treeView.get_selection()->set_mode(Gtk::SELECTION_SINGLE); |
m_treeView.get_selection()->set_mode(Gtk::SELECTION_SINGLE); |
48 |
m_treeView.get_selection()->signal_changed().connect( |
m_treeView.signal_row_activated().connect( |
49 |
sigc::mem_fun(*this, &ReferencesView::onSelectionChanged) |
sigc::mem_fun(*this, &ReferencesView::onSelectionChanged) |
50 |
); |
); |
51 |
|
|
130 |
m_treeView.expand_all(); |
m_treeView.expand_all(); |
131 |
} |
} |
132 |
|
|
133 |
void ReferencesView::onSelectionChanged() { |
void ReferencesView::onSelectionChanged(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column) { |
134 |
if (!m_sample) return; |
if (!m_sample) return; |
135 |
|
|
136 |
Glib::RefPtr<Gtk::TreeSelection> sel = m_treeView.get_selection(); |
Gtk::TreeModel::iterator it = m_refTreeModel->get_iter(path); |
|
Gtk::TreeModel::iterator it = sel->get_selected(); |
|
|
Gtk::TreeModel::Row row = *it; |
|
137 |
if (!it) return; |
if (!it) return; |
138 |
|
|
139 |
|
Gtk::TreeModel::Row row = *it; |
140 |
|
|
141 |
gig::Instrument* pInstrument = row[m_columns.m_col_instr]; |
gig::Instrument* pInstrument = row[m_columns.m_col_instr]; |
142 |
gig::Region* pRegion = row[m_columns.m_col_region]; |
gig::Region* pRegion = row[m_columns.m_col_region]; |
143 |
gig::DimensionRegion* pDimRgn = NULL; |
gig::DimensionRegion* pDimRgn = NULL; |