fixed toggle section
This commit is contained in:
@@ -154,7 +154,7 @@ void XQViewModel::initModel(const QString& modelName)
|
||||
//! die section kann erst gültig sein, wenn die items im model gelandet sind,
|
||||
//! deswegen ist das hier zusammengefasst.
|
||||
|
||||
//! Wrzeugt dann eine section aus einer frisch erzeugten itemlist. Der erste modelindex
|
||||
//! Erzeugt dann eine section aus einer frisch erzeugten itemlist. Der erste modelindex
|
||||
//! der liste und der root knoten der model-beschreibung werden gespeichert.
|
||||
|
||||
void XQViewModel::addSection(const XQItemList& list, const XQNodePtr& sheetNode )
|
||||
@@ -182,7 +182,7 @@ void XQViewModel::addSection(const XQItemList& list, const XQNodePtr& sheetNode
|
||||
//! SLOT, toggled die section mit dem 'sectionKey' (hier: contentType)
|
||||
|
||||
void XQViewModel::onToggleSection(const QString& sectionKey )
|
||||
{
|
||||
{
|
||||
toggleSection( _sections.sectionByKey(sectionKey) );
|
||||
}
|
||||
|
||||
@@ -194,8 +194,7 @@ void XQViewModel::toggleSection( const XQModelSection& section )
|
||||
if( section.isValid() && _treeTable )
|
||||
{
|
||||
XQSectionRange pos = _sections.sectionRange(section);
|
||||
_treeTable->toggleRowsHidden(pos.firstRow, pos.lastRow );
|
||||
emit sectionToggled(section);
|
||||
_treeTable->toggleRowsHidden(pos.firstRow, pos.lastRow );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +521,8 @@ void XQViewModel::cmdToggleSection( const XQCommand& command )
|
||||
const QModelIndex& index = command.originIndex();
|
||||
Q_ASSERT(index.isValid());
|
||||
const XQModelSection& section = _sections.sectionByRow(index.row());
|
||||
toggleSection( section );
|
||||
//toggleSection( section );
|
||||
emit sectionToggled(section);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user