]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge fixes from V6_1_0
authorvsr <vsr@opencascade.com>
Fri, 8 Oct 2010 12:11:39 +0000 (12:11 +0000)
committervsr <vsr@opencascade.com>
Fri, 8 Oct 2010 12:11:39 +0000 (12:11 +0000)
src/BasicGUI/BasicGUI_PointDlg.cxx
src/BasicGUI/BasicGUI_PointDlg.h
src/GEOMImpl/GEOMImpl_PointDriver.cxx

index 1f699305005302c3f87350560a1a181ab73a5056..90af070cd3c473f9527c92482eb8cd62245496bd 100644 (file)
@@ -76,7 +76,8 @@
 //=================================================================================
 BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
                                       bool modal, Qt::WindowFlags fl )
-  : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
+  : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ),
+    myBusy ( false )
 {
   QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT") ) );
   QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_EDGE" ) ) );
@@ -531,6 +532,8 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
       if ( aShape.IsNull() || aShape.ShapeType() != myNeedType)
         return;
 
+      myBusy = true;
+
       if ( id == GEOM_POINT_XYZ ) {
         gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
         GroupXYZ->SpinBox_DX->setValue( aPnt.X() );
@@ -571,6 +574,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
         myFace = aSelectedObject;
         GroupOnSurface->LineEdit1->setText( aName );
       }
+      myBusy = false;
     }
   }
 
@@ -637,6 +641,10 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
     GroupLineIntersection->LineEdit2->setEnabled(true);
   }
   send->setDown(true);
+
+  if ( ( send == GroupLineIntersection->PushButton1 ||
+         send == GroupLineIntersection->PushButton2 ) && !myBusy )
+    SelectionIntoArgument();
 }
 
 
index 3673910473c230041caa1b8e332a01df28351415..5f78bcf787acf550a938c6203ddf2fb6ed0305d7 100644 (file)
@@ -82,6 +82,8 @@ private:
   GEOM::GEOM_Object_var              myLine1; 
   GEOM::GEOM_Object_var              myLine2;
   
+  bool                               myBusy;
+
   DlgRef_3Spin*                      GroupXYZ;
   DlgRef_1Sel3Spin*                  GroupRefPoint;
   DlgRef_1Sel1Spin*                  GroupOnCurve;
index 38065f47f8e75a9509d3ba2ed55450dd426e2183..8af5452e656926f7ee8b4e056f7339b0019e7109 100644 (file)
@@ -190,6 +190,10 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
       Standard_TypeMismatch::Raise
         ("Creation Point On Lines Intersection Aborted : Line shape is not an edge or wire");
     }
+
+    if (aRefShape1.IsSame(aRefShape2))
+      Standard_ConstructionError::Raise("The lines to make intersection must be different");
+
     //Calculate Lines Intersection Point
     BRepExtrema_DistShapeShape dst (aRefShape1, aRefShape2);
     if (dst.IsDone()) {