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

sort, rm unused fcts

parent 69a6085f
No related branches found
No related tags found
1 merge request!2397InstrumentsSet and SamplesSet based on SetWithModel, which owns a QListModel
......@@ -27,6 +27,11 @@ template <class T> class SetWithModel : private OwningVector<T> {
using super = OwningVector<T>;
public:
void clear()
{
super::clear();
m_current_index = -1;
}
void push_back(T* e)
{
super::push_back(e);
......@@ -38,36 +43,6 @@ public:
super::delete_at(m_current_index);
update_current();
}
void insert_at(size_t i, T* e)
{
super::insert_at(i, e);
m_current_index = i;
}
void replace_at(size_t i, T* e)
{
super::replace_at(i, e);
m_current_index = i;
}
void delete_element(const T* e)
{
super::delete_element(e);
update_current();
}
void delete_at(size_t i)
{
super::delete_at(i);
update_current();
}
void swap(size_t from, size_t to)
{
super::swap(from, to);
// TODO update m_current_index ?
}
void clear()
{
super::clear();
m_current_index = -1;
}
void setCurrentIndex(size_t i)
{
......
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