Salome HOME
Merge remote branch 'origin/V7_dev'
[modules/geom.git] / src / EntityGUI / EntityGUI_SketcherDlg.cxx
index 103c50cdc39aeebf26feb9ec6ce53ff6388f07fa..45ecde755367553265afef8e73554dcc21f271a8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -65,6 +65,7 @@
 
 #include <SalomeApp_Study.h>
 #include <SalomeApp_Tools.h>
+#include "utilities.h"
 
 #include <gp_Pln.hxx>
 
@@ -540,7 +541,7 @@ void EntityGUI_SketcherDlg::InitClick()
   Group4Spin->hide();
   GroupRect->hide();
   globalSelection(); // close local selection to clear it
-  localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+  localSelection( TopAbs_VERTEX );
 }
 
 
@@ -631,15 +632,14 @@ void EntityGUI_SketcherDlg::RectClicked()
        SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
   
   GroupRect->show();
-  
   myX1=0;
-  myX2=10;
-  myY1=0;
-  myY2=10;
-
   GroupRect->SpinBox_DX1->setValue(myX1); 
+  myY1=0;
   GroupRect->SpinBox_DY1->setValue(myY1);
+  myX2=10;
   GroupRect->SpinBox_DX2->setValue(myX2);
+  myY2=10;
   GroupRect->SpinBox_DY2->setValue(myY2);
   
   resize( minimumSizeHint() );
@@ -1143,7 +1143,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
     }
 
     QString Command = myCommand.join( "" );
-    Sketcher_Profile aProfile = Sketcher_Profile( Command.toAscii() );
+    Sketcher_Profile aProfile = Sketcher_Profile( Command.toLatin1() );
     bool isDone = false;
     TopoDS_Shape myShape = aProfile.GetShape( &isDone );
     if ( isDone ) {
@@ -1571,7 +1571,7 @@ void EntityGUI_SketcherDlg::SetEditCurrentArgument()
     selButton->setDown(true);
   }
   globalSelection(); // close local selection to clear it
-  localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+  localSelection( myNeedType );
 }
 
 
@@ -2341,12 +2341,12 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
 
     //Last Shape
     QString Command1 = myCommand.join( "" );
-    Sketcher_Profile aProfile1( Command1.toAscii() );
+    Sketcher_Profile aProfile1( Command1.toLatin1() );
     myShape1 = aProfile1.GetShape();
 
     //Current Shape
     QString Command2 = Command1 + GetNewCommand( aParameters );
-    Sketcher_Profile aProfile2( Command2.toAscii() );
+    Sketcher_Profile aProfile2( Command2.toLatin1() );
     myShape2 = aProfile2.GetShape( &isDone, &error );
 
     //Error Message