Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ClippingDlg.cxx
index f415162d5e45fed3f6856b009319b87f91bee996..7551df818a0d5a70d5a93bce657424f1eca558d3 100644 (file)
@@ -43,7 +43,7 @@
 #include "SALOME_ListIteratorOfListIO.hxx"
 
 #include "SalomeApp_Application.h"
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
 
 #include "SVTK_Selector.h"
 #include "SVTK_ViewWindow.h"
@@ -69,6 +69,7 @@
 #include <vtkPlaneSource.h>
 #include <vtkPolyData.h>
 #include <vtkRenderer.h>
+#include <vtkProperty.h>
 
 // STL includes
 #include <algorithm>
@@ -157,20 +158,16 @@ protected:
     myActor->SetInfinitive(true);
     myActor->SetMapper(myMapper);
 
-    vtkProperty* aProp = vtkProperty::New();
     float anRGB[3];
-    anRGB[0] = SMESH::GetFloat("SMESH:SettingsFillColorRed", 0)/255.;
-    anRGB[1] = SMESH::GetFloat("SMESH:SettingsFillColorGreen", 170)/255.;
-    anRGB[2] = SMESH::GetFloat("SMESH:SettingsFillColorBlue", 255)/255.;
+    vtkProperty* aProp = vtkProperty::New();
+    SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
     aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
     aProp->SetOpacity(0.75);
     myActor->SetProperty(aProp);
     aProp->Delete();
 
     vtkProperty* aBackProp = vtkProperty::New();
-    anRGB[0] = SMESH::GetFloat("SMESH:SettingsBackFaceColorRed", 0)/255.;
-    anRGB[1] = SMESH::GetFloat("SMESH:SettingsBackFaceColorGreen", 0)/255.;
-    anRGB[2] = SMESH::GetFloat("SMESH:SettingsBackFaceColorBlue", 255)/255.;
+    SMESH::GetColor( "SMESH", "backface_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 0, 255 ) );
     aBackProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
     aBackProp->SetOpacity(0.75);
     myActor->SetBackfaceProperty(aBackProp);
@@ -365,10 +362,6 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg (SMESHGUI* theModule,
   /* to close dialog if study frame change */
   connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(ClickOnCancel()));
 
-  /* Move widget on the botton right corner of main widget */
-  int x, y;
-  mySMESHGUI->DefineDlgPosition(this, x, y);
-  this->move(x, y);
   this->show();
 }
 
@@ -394,6 +387,10 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
 
   if (SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow(mySMESHGUI)) {
     SUIT_OverrideCursor wc;
+    
+    QWidget *aCurrWid = this->focusWidget();
+    aCurrWid->clearFocus();
+    aCurrWid->setFocus();
 
     myActor->RemoveAllClippingPlanes();