From 6ac3c0b1879be857aa9af52ab6a5de336d1a60a7 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 4 Sep 2008 06:59:10 +0000 Subject: [PATCH] Test Integration: 0019050: EDF 521 GEOM SMESH : Improve selection process in the dialogs --- src/BasicGUI/BasicGUI_LineDlg.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index c7f45e7c0..b36f3379f 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -190,6 +190,7 @@ void BasicGUI_LineDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument->setText( "" ); + GroupPoints->LineEdit2->setText( "" ); myPoint1 = GEOM::GEOM_Object::_nil(); myPoint2 = GEOM::GEOM_Object::_nil(); GroupPoints->PushButton1->setDown(true); @@ -231,7 +232,6 @@ void BasicGUI_LineDlg::SelectionIntoArgument() myEditCurrentArgument->setText( "" ); if ( IObjectCount() != 1 ) { - // printf ( "IObjectCount() != 1 \n" ); if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil(); else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil(); else if ( myEditCurrentArgument == GroupFaces->LineEdit1 ) myFace1 = GEOM::GEOM_Object::_nil(); @@ -239,8 +239,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument() displayPreview(); return; } - // printf ( "IObjectCount() == 1 \n" ); - // nbSel == 1 + Standard_Boolean aRes = Standard_False; GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes ); if ( !CORBA::is_nil( aSelectedObject ) && aRes ) { @@ -314,6 +313,10 @@ void BasicGUI_LineDlg::SelectionIntoArgument() //================================================================================= void BasicGUI_LineDlg::SetEditCurrentArgument() { + if ( IObjectCount() != 0 ) { + globalSelection(); // close local selection to clear it + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + } QPushButton* send = (QPushButton*)sender(); if ( send == GroupPoints->PushButton1 ) { myEditCurrentArgument = GroupPoints->LineEdit1; @@ -332,8 +335,9 @@ void BasicGUI_LineDlg::SetEditCurrentArgument() GroupFaces->PushButton1->setDown(false); } myEditCurrentArgument->setFocus(); - SelectionIntoArgument(); + // SelectionIntoArgument(); send->setDown(true); + displayPreview(); } -- 2.39.2