From: nds Date: Fri, 10 Apr 2015 05:24:32 +0000 (+0300) Subject: The code comment X-Git-Tag: V_1.1.0~51^2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c46f6519b30378dd74a1337697f774060adb4c1;p=modules%2Fshaper.git The code comment --- diff --git a/src/ModuleBase/ModuleBase_Tools.cpp b/src/ModuleBase/ModuleBase_Tools.cpp index a2c393658..6639a548a 100644 --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@ -112,11 +112,11 @@ void setSpinValue(QDoubleSpinBox* theSpin, double theValue) QString objectInfo(const ObjectPtr& theObj) { ResultPtr aRes = std::dynamic_pointer_cast(theObj); - FeaturePtr aFeature;// = std::dynamic_pointer_cast(theObj); + FeaturePtr aFeature = std::dynamic_pointer_cast(theObj); QString aFeatureStr = "feature"; if(aRes.get()) { aFeatureStr.append("(Result)"); - //aFeature = ModelAPI_Feature::feature(aRes); + aFeature = ModelAPI_Feature::feature(aRes); } if (aFeature.get()) { aFeatureStr.append(QString(": %1").arg(aFeature->getKind().c_str()).toStdString().c_str()); diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 368dbb574..9914826ef 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -754,6 +754,14 @@ void XGUI_Displayer::activate(const Handle(AIS_InteractiveObject)& theIO, return; // deactivate object in all modes, which are not in the list of activation + // It seems that after the IO deactivation the selected state of the IO's owners + // is modified in OCC(version: 6.8.0) and the selection of the object later is lost. + // By this reason, the number of the IO deactivate is decreased and the object is deactivated + // only if there is a difference in the current modes and the parameters modes. + // If the selection problem happens again, it is possible to write a test scenario and create + // a bug. The bug steps are the following: + // Create two IO, activate them in 5 modes, select the first IO, deactivate 3 modes for both, + // with clicked SHIFT select the second object. The result is the selection of the first IO is lost. TColStd_ListOfInteger aTColModes; aContext->ActivatedModes(theIO, aTColModes); TColStd_ListIteratorOfListOfInteger itr( aTColModes );