From: ouv Date: Wed, 3 Feb 2010 12:38:21 +0000 (+0000) Subject: Additional fix for issue 0016840: EDF PAL 569: Cut plane on Deformed X-Git-Tag: V5_1_main_20100204 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b4cfaf12f78022a83b8b2a3ea4532d6c05ac180;p=modules%2Fvisu.git Additional fix for issue 0016840: EDF PAL 569: Cut plane on Deformed --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 2f713a63..792634a7 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -3290,7 +3290,7 @@ VisuGUI aRule = "selcount=1 and $type in {'VISU::TCUTLINES' 'VISU::TCUTSEGMENT'} and nbNamedChildren=0"; mgr->setRule( action( VISU_CREATE_TABLE ), aRule ); - aRule = "selcount=1 and ($type in {" + aSimplePrsAll + "})"; + aRule = "selcount=1 and ($type in {" + aSimplePrsAll + "}) and isFieldPrs=0"; mgr->setRule( action( VISU_SWEEP ), aRule ); aRule = "client='ObjectBrowser' and selcount>0"; diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index 949679cf..1610288d 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -53,6 +53,7 @@ QVariant VisuGUI_Selection::parameter( const int ind, const QString& p ) const QVariant val( LightApp_Selection::parameter( ind, p ) ); if ( !val.isValid() ) { if ( p == "type" ) val = QVariant( type( ind ) ); + else if ( p == "isFieldPrs" ) val = QVariant( isFieldPrs( ind ) ); else if ( p == "nbComponents" ) val = QVariant( nbComponents( ind ) ); else if ( p == "medEntity" ) val = QVariant( medEntity( ind ) ); else if ( p == "medSource" ) val = QVariant( medSource( ind ) ); @@ -154,6 +155,19 @@ QString VisuGUI_Selection::type( const int ind ) const } +//--------------------------------------------------------------- +bool VisuGUI_Selection::isFieldPrs( const int ind ) const +{ + SalomeApp_Study* aStudy = GetStudy(); + if ( !aStudy ) + return false; + + VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1()); + VISU::Base_i* aBase = anObjectInfo.myBase; + return ( aBase && aBase->GetType() == VISU::TCOLOREDPRS3DHOLDER ); +} + + //--------------------------------------------------------------- QString VisuGUI_Selection::nbComponents( const int ind ) const { diff --git a/src/VISUGUI/VisuGUI_Selection.h b/src/VISUGUI/VisuGUI_Selection.h index e1bf9155..07fd8024 100644 --- a/src/VISUGUI/VisuGUI_Selection.h +++ b/src/VISUGUI/VisuGUI_Selection.h @@ -47,6 +47,7 @@ public: private: QString type( const int ) const; + bool isFieldPrs( const int ) const; QString nbComponents( const int ) const; QString medEntity( const int ) const; QString medSource( const int ) const;