//! Returns index of the object
//! \param theObject object to find
- virtual QModelIndex objectIndex(const ObjectPtr theObject, int theColumn = 0) const;
+ virtual QModelIndex objectIndex(const ObjectPtr theObject, int theColumn = 1) const;
//! Clear internal data
virtual void clear();
/// Returns an index which is root of the given document
/// \param theDoc a document
- QModelIndex documentRootIndex(DocumentPtr theDoc, int theColumn = 0) const;
+ QModelIndex documentRootIndex(DocumentPtr theDoc, int theColumn = 1) const;
/// Returns last history object index
virtual QModelIndex lastHistoryIndex() const;
ObjectPtr aObj;
for (int i = 0; i < aNb; i++) {
aObj = theDoc->object(ModelAPI_Folder::group(), i);
- QModelIndex aIdx = myDocModel->objectIndex(aObj);
+ QModelIndex aIdx = myDocModel->objectIndex(aObj, 0);
aMap[aObj] = myTreeView->isExpanded(aIdx);
}
return aMap;
{
QMap<ObjectPtr, bool>::const_iterator aIt;
for (aIt = theStates.constBegin(); aIt != theStates.constEnd(); aIt++) {
- QModelIndex aIdx = myDocModel->objectIndex(aIt.key());
+ QModelIndex aIdx = myDocModel->objectIndex(aIt.key(), 0);
myTreeView->setExpanded(aIdx, aIt.value());
}
}