Salome HOME
Fix for the bug #37: Error when import image with format not supported.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportImageOp.cxx
index ca37f4a5fc8e7eb6643c2da40af972d2814b9f36..a144bf344188f5ff84f46c9850c215ae711e3057 100644 (file)
@@ -30,8 +30,6 @@
 #include "HYDROGUI_UpdateFlags.h"
 
 #include <HYDROData_Iterator.h>
-#include <HYDROData_Lambert93.h>
-#include <HYDROData_OperationsFactory.h>
 #include <HYDROData_Tool.h>
 
 #include <GraphicsView_ViewManager.h>
@@ -349,12 +347,12 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags,
   }
   else
   {
-    if ( aTransformationMode == HYDROData_Image::ManualLambert )
+    if ( aTransformationMode == HYDROData_Image::ManualGeodesic )
     {
-      aTrsfPointA = aMap[ HYDROGUI_PrsImage::PointA ].LambertPoint;
-      aTrsfPointB = aMap[ HYDROGUI_PrsImage::PointB ].LambertPoint;
+      aTrsfPointA = aMap[ HYDROGUI_PrsImage::PointA ].GeodesicPoint;
+      aTrsfPointB = aMap[ HYDROGUI_PrsImage::PointB ].GeodesicPoint;
       if ( !anIsByTwoPoints )
-        aTrsfPointC = aMap[ HYDROGUI_PrsImage::PointC ].LambertPoint;
+        aTrsfPointC = aMap[ HYDROGUI_PrsImage::PointC ].GeodesicPoint;
     }
     else
     {
@@ -376,7 +374,7 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags,
 
   anImageObj->SetName( anImageName );
   anImageObj->SetImage( myImage );
-  anImageObj->SetLocalPoints( aPointA, aPointB, aPointC );
+  anImageObj->SetLocalPoints( aPointA, aPointB, aPointC, false );
 
   if ( aTransformationMode == HYDROData_Image::ReferenceImage )
   {
@@ -559,7 +557,6 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName )
       }
     }
   }
-  qApp->processEvents();
 
   if( !aViewPort )
     return;
@@ -598,6 +595,7 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName )
   // Split views horizontally
   if( anApp->desktop()->inherits( "STD_TabDesktop" ) )
   {
+    qApp->processEvents();
     QtxWorkstack* aWorkstack = ( (STD_TabDesktop*)anApp->desktop() )->workstack();
     aViewPort->activateWindow();
     aViewPort->show();