void PartSet_Module::closeDocument()
{
+ myActivePartIndex = QModelIndex();
clearViewer();
}
SessionPtr aMgr = ModelAPI_Session::get();
DocumentPtr aActiveDoc = aMgr->activeDocument();
- if (aActivePartIndex.isValid())
- aTreeView->setExpanded(aActivePartIndex, false);
+ if (myActivePartIndex.isValid())
+ aTreeView->setExpanded(myActivePartIndex, false);
XGUI_DataModel* aDataModel = aWorkshop->objectBrowser()->dataModel();
- aActivePartIndex = aDataModel->documentRootIndex(aActiveDoc);
- if (aActivePartIndex.isValid())
- aTreeView->setExpanded(aActivePartIndex, true);
+ myActivePartIndex = aDataModel->documentRootIndex(aActiveDoc);
+ if (myActivePartIndex.isValid())
+ aTreeView->setExpanded(myActivePartIndex, true);
aLabel->setPalette(aPalet);
aWorkshop->updateCommandStatus();
/// backup of the visible state to restore them by operation stop
QMap<PartSet_Tools::ConstraintVisibleState, bool> myHasConstraintShown;
- QModelIndex aActivePartIndex;
+ QModelIndex myActivePartIndex;
};
#endif
XGUI_DataModel::~XGUI_DataModel()
{
+ clear();
}
//******************************************************
//******************************************************
void XGUI_DataModel::clear()
{
-
+ beginResetModel();
+ endResetModel();
}
//******************************************************