Salome HOME
ModuleBase_ViewerPrs is wrapped into shared_ptr.
authornds <nds@opencascade.com>
Wed, 6 Apr 2016 15:04:08 +0000 (18:04 +0300)
committernds <nds@opencascade.com>
Wed, 6 Apr 2016 15:04:08 +0000 (18:04 +0300)
src/XGUI/XGUI_SelectionMgr.cpp

index 75ac1268589b1289760b055294d18310fca97491..23a6cbcb75620d46f56b6320f5cc7400f16e6c58 100755 (executable)
@@ -130,12 +130,12 @@ void XGUI_SelectionMgr::onViewerSelection()
   if (!aContext.IsNull()) {
     QList<ModuleBase_ViewerPrsPtr> aPresentations = selection()->getSelected(ModuleBase_ISelection::Viewer);
     foreach(ModuleBase_ViewerPrsPtr aPrs, aPresentations) {
-      if (aPrs.object().get()) {
-        aFeatures.append(aPrs.object());
-        if (aPrs.shape().get()) {
-          aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs.object());
+      if (aPrs->object().get()) {
+        aFeatures.append(aPrs->object());
+        if (aPrs->shape().get()) {
+          aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs->object());
           if (aResult.get()) {
-            aFeature = anActiveDocument->producedByFeature(aResult, aPrs.shape());
+            aFeature = anActiveDocument->producedByFeature(aResult, aPrs->shape());
             if (aFeature.get() && (!aFeatures.contains(aFeature)))
               aFeatures.append(aFeature);
           }