From: vsv Date: Mon, 8 Sep 2014 14:17:49 +0000 (+0400) Subject: Process parts activation method X-Git-Tag: V_0.4.4~78^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5443a0a6e6b706ef42d7877a84ff3bf33bc3ba6c;p=modules%2Fshaper.git Process parts activation method --- diff --git a/src/XGUI/XGUI_PartDataModel.cpp b/src/XGUI/XGUI_PartDataModel.cpp index 16adcadf7..6a5ffdc96 100644 --- a/src/XGUI/XGUI_PartDataModel.cpp +++ b/src/XGUI/XGUI_PartDataModel.cpp @@ -333,7 +333,13 @@ int XGUI_PartDataModel::rowCount(const QModelIndex& parent) const } switch (parent.internalId()) { case MyRoot: - return 3 + partDocument()->size(ModelAPI_Feature::group()); + { + DocumentPtr aDoc = partDocument(); + if (aDoc) + return 3 + aDoc->size(ModelAPI_Feature::group()); + else + return 0; + } case ParamsFolder: return partDocument()->size(ModelAPI_ResultParameters::group()); case ConstructFolder: diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 9d51cd865..76407ea44 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -988,6 +988,8 @@ void XGUI_Workshop::onWidgetValuesChanged() //************************************************************** void XGUI_Workshop::activatePart(ResultPartPtr theFeature) { + if (theFeature) + theFeature->activate(); changeCurrentDocument(theFeature); myObjectBrowser->activatePart(theFeature); }