From: mzn Date: Fri, 3 Apr 2015 13:25:26 +0000 (+0300) Subject: refs #499: Fatal error when Edit image. X-Git-Tag: BR_hydro_v_1_0_5~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c9ce0d3cdc88020c51bd3b527288c8aa8e249581;p=modules%2Fhydro.git refs #499: Fatal error when Edit image. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index afa0aa74..6a28b637 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -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();