Salome HOME
Refs #288 - the profile section selected and addition mode is activated
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ChannelOp.cxx
index 4ccd4df478abdb9737beb6b43446b3d897a977e9..2ffdc5430d9462acec9f976708c2513cad10a1b4 100644 (file)
@@ -129,7 +129,7 @@ HYDROGUI_InputPanel* HYDROGUI_ChannelOp::createInputPanel() const
 }
 
 bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags,
-                                              QString& theErrorMsg )
+                                       QString& theErrorMsg )
 {
   HYDROGUI_ChannelDlg* aPanel = ::qobject_cast<HYDROGUI_ChannelDlg*>( inputPanel() );
   if ( !aPanel )
@@ -158,7 +158,8 @@ bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags,
 
   myEditedObject->SetName( anObjectName );
 
-  if ( !myIsEdit ) {
+  if ( !myIsEdit )
+  {
     myEditedObject->SetFillingColor( HYDROData_Channel::DefaultFillingColor() );
     myEditedObject->SetBorderColor( HYDROData_Channel::DefaultBorderColor() );
   }
@@ -168,7 +169,9 @@ bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags,
   if( !myIsEdit )
     module()->setObjectVisible( HYDROGUI_Tool::GetActiveOCCViewId( module() ), myEditedObject, true );
 
-  theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced;
+  module()->setIsToUpdate( myEditedObject );
+
+  theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
 
   return true;
 }
@@ -233,7 +236,7 @@ void HYDROGUI_ChannelOp::onCreatePreview( const bool theIsInit )
   if ( !myViewManager || !myPreviewPrs )
     return;
 
-  myPreviewPrs->update();
+  myPreviewPrs->update( true, true );
 }
 
 void HYDROGUI_ChannelOp::erasePreview()