refs #325 added sort flag for models / views, allow to update, but not to sort

This commit is contained in:
Klaus Basan
2014-10-02 17:43:51 +02:00
parent 053c248f06
commit 2a11411bc0
3 changed files with 12 additions and 13 deletions

View File

@@ -84,10 +84,10 @@ namespace BlackGui
virtual void clear() override { Q_ASSERT(this->m_model); this->m_model->clear(); }
//! Update whole container
template<class ContainerType> int updateContainer(const ContainerType &container, bool resize = true)
template<class ContainerType> int updateContainer(const ContainerType &container, bool sort = true, bool resize = true)
{
Q_ASSERT(this->m_model);
int c = this->m_model->update(container);
int c = this->m_model->update(container, sort);
if (!resize) return c;
this->resizeColumnsToContents();
this->resizeRowsToContents();