Salome HOME
Fix for the bug #42: point C is not activated, but point C is shown in preview in...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index ff04b7d02c53225a87bf17907dcd4ffa36077349..b36585e22f5de3e928030780271e0b060830d6c4 100644 (file)
@@ -243,7 +243,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
                 anIsSplittedImage = true;
             }
           }
-          anIsMustBeUpdatedImage = anImage->MustBeUpdated();
+          anIsMustBeUpdatedImage = anImage->IsMustBeUpdated();
         }
       }
       else if( anObject->GetKind() == KIND_POLYLINE )
@@ -586,10 +586,12 @@ void HYDROGUI_Module::removeObjectShape( const int                       theView
     return;
 
   ListOfShapes& aViewShapes = myShapesMap[ theViewId ];
+  Handle(HYDROData_Entity) anObject;
   for ( int i = 0; i < aViewShapes.length(); )
   {
     HYDROGUI_Shape* aShape = aViewShapes.at( i );
-    if ( aShape && IsEqual( aShape->getObject(), theObject ) )
+    anObject = aShape->getObject();
+    if ( aShape && (!anObject.IsNull()) && IsEqual( anObject, theObject ) )
     {
       delete aShape;
       aViewShapes.removeAt( i );
@@ -647,7 +649,7 @@ void HYDROGUI_Module::customEvent( QEvent* e )
           //aViewPort->setViewLabelPosition( GraphicsView_ViewPort::VLP_BottomLeft, true );
         }
 
-        if( aRole != VMR_TransformImage )
+        if( aRole != VMR_TransformImage && aRole != VMR_ReferenceImage )
           update( UF_Viewer );
 
         aViewer->activateTransform( GraphicsView_Viewer::FitAll );