]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #499: Fatal error when Edit image.
authormzn <mzn@opencascade.com>
Fri, 3 Apr 2015 13:25:26 +0000 (16:25 +0300)
committermzn <mzn@opencascade.com>
Fri, 3 Apr 2015 13:25:26 +0000 (16:25 +0300)
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx

index afa0aa74f4640051c7fdc025481f3252dee476ca..6a28b63737811f8a6b2001d00188982451c4f65c 100644 (file)
@@ -615,7 +615,12 @@ void HYDROGUI_ImportImageOp::onCreatePreview( QImage theImage )
 
           aViewPort->addItem( myPreviewPrs );
           aViewPort->fitAll();
-
+          
+          if ( myEditedObject ) {
+            size_t aViewId = (size_t)aViewer;
+            module()->setObjectVisible( aViewId, myEditedObject, true );
+          }
+          
           myPreviewPrs->setIsTransformationPointPreview( true );
         }
         connect( aViewer, SIGNAL( selectionChanged( GV_SelectionChangeStatus ) ),
@@ -738,9 +743,13 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName )
   if( !aViewPort )
     return;
 
+  size_t aViewId = (size_t)myRefViewManager->getViewer();
+
   // Remove the old presentation of the reference image if any
   if( myRefPreviewPrs )
   {
+    module()->setObjectVisible( aViewId, myRefPreviewPrs->getObject(), false );
+
     myRefPreviewPrs->setCaption( QString() );
     aViewPort->removeItem( myRefPreviewPrs );
 
@@ -767,6 +776,8 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName )
 
     // Add the new reference image presentation to the appropriate view
     aViewPort->addItem( myRefPreviewPrs );
+
+    module()->setObjectVisible( aViewId, anImageObj, true );
   }
 
   aViewPort->fitAll();