X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLightApp%2FLightApp_Plot2dSelector.cxx;h=f903cb5dafc121ea7016b73247119efa9697f0ce;hb=331294345d3e1716fbf79ae25a2851011729be79;hp=c128219af814ce292cbddd99cb8985980500fc08;hpb=034a705024b224972c148e1e3834c5ee38df184b;p=modules%2Fgui.git diff --git a/src/LightApp/LightApp_Plot2dSelector.cxx b/src/LightApp/LightApp_Plot2dSelector.cxx index c128219af..f903cb5da 100755 --- a/src/LightApp/LightApp_Plot2dSelector.cxx +++ b/src/LightApp/LightApp_Plot2dSelector.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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() ) - theList.append( new LightApp_DataOwner( new SALOME_InteractiveObject(qPrintable(myCurEntry),"","") ) ); + if( !myCurEntry.isNull() ) { +#ifndef DISABLE_SALOMEOBJECT + theList.append( new LightApp_DataOwner( new SALOME_InteractiveObject(qUtf8Printable(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(qUtf8Printable(owner->entry()),"","") ); } } } @@ -74,6 +84,7 @@ void LightApp_Plot2dSelector::setSelection( const SUIT_DataOwnerPtrList& theList if(v) v->setObjectsSelected(anIOList); +#endif } /*!On selection changed.*/