From: apo Date: Mon, 29 Aug 2005 08:23:31 +0000 (+0000) Subject: Fix a regression X-Git-Tag: T_3_0_2a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8dab8b808988e3c3161a60b8c2b1ff54f695fef1;p=modules%2Fvisu.git Fix a regression --- diff --git a/src/VISUGUI/VisuGUI_PopupTools.cxx b/src/VISUGUI/VisuGUI_PopupTools.cxx index 837ba8af..74175dff 100644 --- a/src/VISUGUI/VisuGUI_PopupTools.cxx +++ b/src/VISUGUI/VisuGUI_PopupTools.cxx @@ -58,17 +58,41 @@ QtxValue VisuGUI_Selection::param( const int ind, const QString& p ) const #define ENUM2STRING( x, y ) \ case y: \ x = QString( #y ); \ - break; + break QString VisuGUI_Selection::type( const int ind ) const { QString aResStr; VISU::Storable::TRestoringMap aMap; - GetSelectedObj( study(), entry( ind ), &aMap ); + CORBA::Object_var anObject = GetSelectedObj( study(), entry( ind ), &aMap ); bool isExist; const QString& aVal = VISU::Storable::FindValue(aMap,"myComment",&isExist); if ( isExist ) aResStr = "VISU::T" + aVal; + else{ + VISU::Base_var aVisuObj = VISU::Base::_narrow( anObject ); + if ( !CORBA::is_nil( aVisuObj ) ){ + VISU::VISUType aType = aVisuObj->GetType(); + switch (aType) { + ENUM2STRING( aResStr, VISU::TVISUGEN ); + ENUM2STRING( aResStr, VISU::TRESULT ); + ENUM2STRING( aResStr, VISU::TTABLE ); + ENUM2STRING( aResStr, VISU::TCURVE ); + ENUM2STRING( aResStr, VISU::TCONTAINER ); + ENUM2STRING( aResStr, VISU::TMESH ); + ENUM2STRING( aResStr, VISU::TSCALARMAP ); + ENUM2STRING( aResStr, VISU::TISOSURFACE ); + ENUM2STRING( aResStr, VISU::TDEFORMEDSHAPE ); + ENUM2STRING( aResStr, VISU::TCUTPLANES ); + ENUM2STRING( aResStr, VISU::TCUTLINES ); + ENUM2STRING( aResStr, VISU::TVECTORS ); + ENUM2STRING( aResStr, VISU::TSTREAMLINES ); + ENUM2STRING( aResStr, VISU::TPLOT3D ); + ENUM2STRING( aResStr, VISU::TANIMATION ); + } + } + } + return aResStr; } @@ -104,11 +128,11 @@ QString VisuGUI_Selection::representation( const int ind ) const if ( VISU_Actor* anVISUActor = FindActor( aView, entry( ind ).latin1() ) ){ int aRepresent = anVISUActor->GetRepresentation(); switch ( aRepresent ){ - ENUM2STRING( aResStr, VISU::POINT ) - ENUM2STRING( aResStr, VISU::WIREFRAME ) - ENUM2STRING( aResStr, VISU::SHADED ) - ENUM2STRING( aResStr, VISU::INSIDEFRAME ) - ENUM2STRING( aResStr, VISU::SURFACEFRAME ) + ENUM2STRING( aResStr, VISU::POINT ); + ENUM2STRING( aResStr, VISU::WIREFRAME ); + ENUM2STRING( aResStr, VISU::SHADED ); + ENUM2STRING( aResStr, VISU::INSIDEFRAME ); + ENUM2STRING( aResStr, VISU::SURFACEFRAME ); } } }