From a4c91f089391a401b5c882ae03a4680015a45399 Mon Sep 17 00:00:00 2001 From: skv Date: Fri, 7 Nov 2014 10:03:52 +0300 Subject: [PATCH] 0022540: EDF 2857 GEOM : problem to generate a face --- src/BuildGUI/BuildGUI_FaceDlg.cxx | 36 +++++++++++++++++++------------ src/BuildGUI/BuildGUI_FaceDlg.h | 1 + 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index bdd72265b..3a5884fee 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -106,10 +106,7 @@ void BuildGUI_FaceDlg::Init() GroupWire->CheckButton1->setChecked( true ); myWires.clear(); - TColStd_MapOfInteger aMap; - aMap.Add( GEOM_EDGE ); - aMap.Add( GEOM_WIRE ); - globalSelection( aMap ); + setGlobalSelection(); /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); @@ -123,6 +120,23 @@ void BuildGUI_FaceDlg::Init() SelectionIntoArgument(); } +//================================================================================= +// function : setGlobalSelection +// purpose : +//================================================================================= +void BuildGUI_FaceDlg::setGlobalSelection() +{ + TColStd_MapOfInteger aMap; + + aMap.Add(GEOM_EDGE); + aMap.Add(GEOM_WIRE); + aMap.Add(GEOM_FACE); + aMap.Add(GEOM_SHELL); + aMap.Add(GEOM_SOLID); + aMap.Add(GEOM_COMPOUND); + + globalSelection(aMap); +} //================================================================================= // function : ClickOnOk() @@ -159,7 +173,8 @@ void BuildGUI_FaceDlg::SelectionIntoArgument() myEditCurrentArgument->setText( "" ); QList types; - types << TopAbs_EDGE << TopAbs_WIRE; + types << TopAbs_EDGE << TopAbs_WIRE << TopAbs_FACE + << TopAbs_SHELL << TopAbs_SOLID << TopAbs_COMPOUND; myWires = getSelected( types, -1 ); if ( !myWires.isEmpty() ) { @@ -178,12 +193,8 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument() QPushButton* send = (QPushButton*)sender(); if ( send != GroupWire->PushButton1 ) return; - - TColStd_MapOfInteger aMap; - aMap.Add( GEOM_EDGE ); - aMap.Add( GEOM_WIRE ); - globalSelection( aMap ); + setGlobalSelection(); myEditCurrentArgument = GroupWire->LineEdit1; myEditCurrentArgument->setFocus(); @@ -200,10 +211,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - TColStd_MapOfInteger aMap; - aMap.Add( GEOM_EDGE ); - aMap.Add( GEOM_WIRE ); - globalSelection( aMap ); + setGlobalSelection(); } diff --git a/src/BuildGUI/BuildGUI_FaceDlg.h b/src/BuildGUI/BuildGUI_FaceDlg.h index d0e667072..9a2f89c32 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.h +++ b/src/BuildGUI/BuildGUI_FaceDlg.h @@ -53,6 +53,7 @@ protected: private: void Init(); void enterEvent( QEvent* ); + void setGlobalSelection(); private: QList myWires; -- 2.39.2