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

VectorWC + currentItem()

parent e3349010
No related branches found
No related tags found
1 merge request!2387unify code for list views
......@@ -83,6 +83,14 @@ public:
m_current_index = i;
}
size_t currentIndex() const { return m_current_index; }
const T* currentItem() const
{
return m_current_index < super::size() ? super::at(m_current_index) : (T*)nullptr;
}
T* currentItem()
{
return m_current_index < super::size() ? super::at(m_current_index) : (T*)nullptr;
}
private:
void update_current()
......
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