X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLightApp%2FLightApp_Plot2dSelector.cxx;h=27b6edcf38b80f43186a712dee20e2f910c04a88;hb=68aee8800d95437a7b8ab577fad288e0d0640613;hp=c128219af814ce292cbddd99cb8985980500fc08;hpb=d26f738c9c427a45409bacf3848fd8c224edf6ed;p=modules%2Fgui.git diff --git a/src/LightApp/LightApp_Plot2dSelector.cxx b/src/LightApp/LightApp_Plot2dSelector.cxx index c128219af..27b6edcf3 100755 --- a/src/LightApp/LightApp_Plot2dSelector.cxx +++ b/src/LightApp/LightApp_Plot2dSelector.cxx @@ -24,9 +24,12 @@ #include "LightApp_Application.h" #include "SUIT_SelectionMgr.h" -#include - -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #ifndef DISABLE_PLOT2DVIEWER + #include + #endif +#endif /*! Constructor @@ -52,21 +55,28 @@ LightApp_Plot2dSelector::~LightApp_Plot2dSelector() */ void LightApp_Plot2dSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const { - if( !myCurEntry.isNull() ) + if( !myCurEntry.isNull() ) { +#ifndef DISABLE_SALOMEOBJECT theList.append( new LightApp_DataOwner( new SALOME_InteractiveObject(qPrintable(myCurEntry),"","") ) ); +#else + theList.append( new LightApp_DataOwner( myCurEntry ) ); +#endif + } } /*!Sets selection.*/ void LightApp_Plot2dSelector::setSelection( const SUIT_DataOwnerPtrList& theList ) { +#ifndef DISABLE_SALOMEOBJECT SALOME_ListIO anIOList; for ( SUIT_DataOwnerPtrList::const_iterator it = theList.begin(); it != theList.end(); ++it ) { const LightApp_DataOwner* owner = dynamic_cast( (*it).operator->() ); if ( owner ) { if( !owner->IO().IsNull() ) { - anIOList.Append(owner->IO()); - } else if ( !owner->entry().isEmpty() ) { - anIOList.Append( new SALOME_InteractiveObject(qPrintable(owner->entry()),"","") ); + anIOList.Append(owner->IO()); + } + else if ( !owner->entry().isEmpty() ) { + anIOList.Append( new SALOME_InteractiveObject(qPrintable(owner->entry()),"","") ); } } } @@ -74,6 +84,7 @@ void LightApp_Plot2dSelector::setSelection( const SUIT_DataOwnerPtrList& theList if(v) v->setObjectsSelected(anIOList); +#endif } /*!On selection changed.*/