Salome HOME
lots 3,8 - corrections
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_LandCoverMapOp.cxx
index 6426928ffcc0abd1874e10baef2245f8a37ce0a3..5c982205e6deb6245d7851bb347080f1ca7ce0fc 100644 (file)
@@ -155,10 +155,12 @@ void HYDROGUI_LandCoverMapOp::abortOperation()
 {
   closePreview();
 
+  bool aNoActiveOps = module()->getActiveOperations().isEmpty();
+
   HYDROGUI_Operation::abortOperation();
 
   SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( module()->getApp()->activeStudy() );
-  if ( aStudy )
+  if ( aStudy && !aNoActiveOps )
     module()->update( UF_OCCViewer | UF_FitAll );
 }
 
@@ -374,6 +376,9 @@ bool HYDROGUI_LandCoverMapOp::processApply( int& theUpdateFlags,
   if ( myOperationId == CreateLandCoverMapId )
     module()->enableLCMActions();
 
+  if ( myOperationId == RemoveLandCoverId || myOperationId == MergeLandCoverId || myOperationId == ChangeLandCoverTypeId )
+    aPanel->updateSelectedLandCoversLabel( getNbSelected() );
+
   return true;
 }
 
@@ -460,7 +465,7 @@ void HYDROGUI_LandCoverMapOp::onPolylineFaceChanged()
             if ( !aCtx.IsNull() )
             {
               myPolylineFacePreviewPrs = new HYDROGUI_Shape( aCtx, NULL, getPreviewZLayer() );
-              aCtx->ClearSelected();
+              aCtx->ClearSelected(true);
 
               myPolylineFacePreviewPrs->setBorderColor( Qt::white, false, false );
               myPolylineFacePreviewPrs->setShape( aTopoDSShape, true, true, !aPolyline.IsNull() ? AIS_WireFrame : AIS_Shaded );
@@ -618,7 +623,7 @@ void HYDROGUI_LandCoverMapOp::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseE
     if ( !aViewer->isPreselectionEnabled() ) {
       Handle(V3d_View) aView3d = aView->getViewPort()->getView();
       if ( !aView3d.IsNull() ) {
-        aCtx->MoveTo(myEndPnt.x(), myEndPnt.y(), aView3d);
+        aCtx->MoveTo(myEndPnt.x(), myEndPnt.y(), aView3d, true);
       }
     }