Skip to content
Snippets Groups Projects
Commit 760d62bd authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm SamplesQListView::setCurrentSample

parent b67a8e12
No related branches found
No related tags found
1 merge request!2387unify code for list views
......@@ -89,11 +89,6 @@ SamplesQListView::SamplesQListView()
}
}
void SamplesQListView::setCurrentSample(SampleItem* sample)
{
setCurrentIndex(m_model->indexForItem(sample));
}
SampleItem* SamplesQListView::currentSampleItem()
{
return m_model->itemForIndex(currentIndex());
......@@ -161,7 +156,7 @@ void SamplesQListView::restoreSelection()
QModelIndex currentIndex = m_model->index(selected, 0, QModelIndex());
if (currentIndex.isValid()) {
selectionModel()->select(currentIndex, QItemSelectionModel::ClearAndSelect);
setCurrentSample(gDoc->samples()->shared()[selected]);
gDoc->samplesModifier()->setCurrentIndex(selected);
}
}
......
......@@ -26,7 +26,6 @@ class SamplesQListView : public QListView {
public:
SamplesQListView();
void setCurrentSample(SampleItem* sample);
SampleItem* currentSampleItem();
void restoreSelection();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment