OnImportFromFile()
{
if(MYDEBUG) MESSAGE("VisuGUI::OnImportFromFile()");
- if ( CheckLock(GetCStudy(GetAppStudy(this))) )
+ if ( CheckLock(GetCStudy(GetAppStudy(this)),GetDesktop(this)) )
return;
VisuGUI_BuildProgressDlg* aBuildProgressDlg = new VisuGUI_BuildProgressDlg( GetDesktop(this) );
{
if(MYDEBUG) MESSAGE("VisuGUI::OnExploreMEDFile()");
_PTR(Study) aStudy = GetCStudy(GetAppStudy(this));
- if ( CheckLock(aStudy) )
+ if ( CheckLock(aStudy,GetDesktop(this)) )
return;
SALOME_MED::MED_Gen_var aGen = GetMEDEngine();
OnImportTableFromFile()
{
if(MYDEBUG) MESSAGE("VisuGUI::OnImportTableFromFile()");
- if ( CheckLock(GetCStudy(GetAppStudy(this))) )
+ if ( CheckLock(GetCStudy(GetAppStudy(this)),GetDesktop(this)) )
return;
QStringList aFilter;
OnImportMedField()
{
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy))
+ if (CheckLock(aCStudy,GetDesktop(this)))
return;
SALOMEDS::Study_var aStudy = GetDSStudy(aCStudy);
OnCreateMesh()
{
_PTR(Study) aStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aStudy))
+ if (CheckLock(aStudy,GetDesktop(this)))
return;
// Get selected SObject
OnCreateManyMesh()
{
_PTR(Study) aStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aStudy))
+ if (CheckLock(aStudy,GetDesktop(this)))
return;
// create a VTK view window if it does not exist
VisuGUI::
OnCreatePlot2dView()
{
- CheckLock(GetCStudy(GetAppStudy(this)));
+ CheckLock(GetCStudy(GetAppStudy(this)),GetDesktop(this));
GetVisuGen( this )->CreateContainer();
UpdateObjBrowser(this);
}
if(MYDEBUG) MESSAGE("VisuGUI::OnDisplayPrs");
QApplication::setOverrideCursor(Qt::waitCursor);
- SALOME_ListIO aList;
+ SALOME_ListIO aSel, aList;
LightApp_SelectionMgr* mgr = GetSelectionMgr(this);
- mgr->selectedObjects(aList);
+ mgr->selectedObjects( aSel );
+
+ extractContainers( aSel, aList );
Handle(SALOME_InteractiveObject) anIO;
for ( SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next() ) {
if (vw)
vw->unHighlightAll();
- SALOME_ListIO aList;
+ SALOME_ListIO aList, aSel;
LightApp_SelectionMgr* mgr = GetSelectionMgr(this);
- mgr->selectedObjects(aList);
+ mgr->selectedObjects( aSel );
+
+ extractContainers( aSel, aList );
Handle(SALOME_InteractiveObject) anIO;
for ( SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next() ) {
anIO = it.Value();
CORBA::Object_var anObject = GetSelectedObj( GetAppStudy(this), anIO->getEntry() );
+ if (!CORBA::is_nil(anObject))
+ RemoveScalarBarPosition(this,anObject);
ErasePrs( this, anObject, false );
}
for (anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL; ) {
if (anActor->GetVisibility() > 0)
if (VISU_Actor* anVISUActor = VISU_Actor::SafeDownCast(anActor)) {
+ RemoveScalarBarPosition(this,anVISUActor->GetPrs3d());
anVISUActor->VisibilityOff();
}
}
OnDeleteObjects()
{
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy))
+ if (CheckLock(aCStudy,GetDesktop(this)))
return;
SALOME_ListIO aList;
OnClearContainer()
{
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy))
+ if (CheckLock(aCStudy,GetDesktop(this)))
return;
Handle(SALOME_InteractiveObject) anIO;
CORBA::Object_var anObject = GetSelectedObj(this, &anIO);
OnSaveViewParams()
{
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy))
+ if (CheckLock(aCStudy,GetDesktop(this)))
return;
SUIT_ViewManager* aViewMgr = getApp()->activeViewManager();
OnRename()
{
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy))
+ if (CheckLock(aCStudy,GetDesktop(this)))
return;
Handle(SALOME_InteractiveObject) anIO;
OnCopyPresentation()
{
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy))
+ if (CheckLock(aCStudy,GetDesktop(this)))
return;
Handle(SALOME_InteractiveObject) anIO;
QString orCurveInvisible = "or (type='VISU::TCURVE'" + andInvisible + ")";
QString aPrsVisible = "(($type in {'VISU::TMESH' " + aPrsAll + "}) and isVisible)";
QString aPrsInvisible = "(($type in {'VISU::TMESH' " + aPrsAll + "})" + andInvisible + ")";
+ QString aComponent = "( selcount=1 and canBeDisplayed )";
- QString anEraseRule = "selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsVisible +
- " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveVisible + ")))";
+ QString anEraseRule = "( selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsVisible +
+ " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveVisible + "))) ) or " + aComponent;
- QString aDisplayRule = "selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsInvisible +
- " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveInvisible + ")))";
+ QString aDisplayRule = "( selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsInvisible +
+ " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveInvisible + "))) ) or" + aComponent;
- QString aDOnlyRule = "selcount>0 and ({true} in $canBeDisplayed) and (($type in {'VISU::TMESH' " + aPrsAll + "})"
+ QString aDOnlyRule = "( selcount>0 and ({true} in $canBeDisplayed) and (($type in {'VISU::TMESH' " + aPrsAll + "})"
" or (client='ObjectBrowser' and ((type='VISU::TTABLE' and nbChildren>0) or"
- " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'}))))";
+ " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'})))) ) or" + aComponent;
mgr->setRule( action( VISU_ERASE ), anEraseRule, true );
mgr->setRule( action( VISU_DISPLAY ), aDisplayRule, true );
setPreferenceProperty( wh, "max", 1.0 );
setPreferenceProperty( hh, "max", 1.0 );
+ int scalarBarGr = addPreference( tr( "Scalar bars default position" ), sbarTab );
+ addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr, LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" );
+
int srangeTab = addPreference( tr( "Sweep, MED import" ) );
int sweepGr = addPreference( tr( "VISU_SWEEPING_PREF" ), srangeTab );
return getApp()->getViewManager(theType,theIsCreate);
}
+TViewToPrs3d
+VisuGUI
+::getScalarBarsMap()
+{
+ return myScalarBarsMap;
+}
LightApp_Displayer* VisuGUI::displayer()
{
if( !myDisplayer )
#include "SalomeApp_Module.h"
+#include <map>
+#include <set>
+
class SUIT_ViewManager;
+class SVTK_ViewWindow;
+class Prs3d_i;
+
+namespace VISU{
+typedef std::pair<Prs3d_i*,int> TPrs3dToInd; // prs pointer and default index of scalar bar placement
+typedef std::set<TPrs3dToInd> TSetPrs3d;
+typedef std::map<SVTK_ViewWindow*,TSetPrs3d> TViewToPrs3d;
+}
class VisuGUI: public SalomeApp_Module
{
getViewManager(const QString& theType,
const bool theIsCreate);
+ VISU::TViewToPrs3d getScalarBarsMap();
+ VISU::TViewToPrs3d myScalarBarsMap;
+
public slots:
virtual bool deactivateModule( SUIT_Study* );
virtual bool activateModule( SUIT_Study* );
if( CORBA::is_nil( anObj ) )
return false;
+ if( study->isComponent( entry ) )
+ return true;
+
if( viewer_type==SVTK_Viewer::Type() || viewer_type==VVTK_Viewer::Type())
{
VISU::Prs3d_i* thePrs = dynamic_cast<VISU::Prs3d_i*>( VISU::GetServant( anObj ).in() );
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
#include "VisuGUI_OffsetDlg.h"
void VisuGUI_Plot3DDlg::accept()
{
if (myIsoPane->check() && myScalarPane->check())
- QDialog::accept();
+ {
+ myScalarPane->deletePreview();
+ QDialog::accept();
+ }
}
//=======================================================================
void VisuGUI_Plot3DDlg::reject()
{
myIsoPane->check(); // hide preview
-
+ myScalarPane->deletePreview();
+
QDialog::reject();
}
QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1();
QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1();
QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1();
+ //
+ int aPos = GetFreePositionOfDefaultScalarBar(theModule);
+ GetResourceMgr()->setValue("VISU","scalar_bar_position_num",aPos);
+ //
QApplication::setOverrideCursor(Qt::waitCursor);
TPrs3d_i* aPrs3d =
}
PublishInView<TViewer>(theModule,aPrs3d,true,theIsCreateView);
+ AddScalarBarPosition(theModule,aPrs3d,aPos);
+
return true;
}
CreatePrs3d(VisuGUI* theModule,
const bool theIsCreateView = true)
{
- if (CheckLock(GetCStudy(GetAppStudy(theModule))))
+ if (CheckLock(GetCStudy(GetAppStudy(theModule)),GetDesktop(theModule)))
return;
_PTR(SObject) aTimeStampSObj;
#include "SVTK_ViewWindow.h"
+#include "SVTK_ViewWindow.h"
+
#include "VISUConfig.hh"
#include "VISU_Convertor.hxx"
myBusy = false;
}
-
/**
* Initializes dialog box values from resources
*/
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ bool anIsArrangeBar = aResourceMgr->booleanValue("VISU", "scalar_bars_default_position", 0);
+ int aPlace = 1;
+ if (anIsArrangeBar){
+ aPlace = aResourceMgr->integerValue("VISU", "scalar_bar_position_num",0);
+ }
+
int aScalarMode = aResourceMgr->integerValue("VISU", "scalar_bar_mode", 0);
myModeCombo->setCurrentItem(aScalarMode);
sbW = aResourceMgr->doubleValue("VISU", propertyName + "width", sbW);
sbH = aResourceMgr->doubleValue("VISU", propertyName + "height",sbH);
+ if(orient){
+ sbY1 += sbH*(aPlace-1);
+ } else {
+ sbX1 += sbW*(aPlace-1);
+ }
sbCol = aResourceMgr->integerValue("VISU" ,"scalar_bar_num_colors", sbCol);
sbLab = aResourceMgr->integerValue("VISU", "scalar_bar_num_labels", sbLab);
#include "SUIT_Session.h"
#include "SUIT_MessageBox.h"
+#include "VisuGUI.h"
+
#include <vtkRenderer.h>
#include <vtkActorCollection.h>
}
bool
- CheckLock( _PTR(Study) theStudy )
+ CheckLock( _PTR(Study) theStudy,
+ QWidget* theWidget )
{
- if(IsStudyLocked(theStudy))
- throw std::runtime_error(QObject::tr("WRN_STUDY_LOCKED").latin1());
+ if(IsStudyLocked(theStudy)){
+ SUIT_MessageBox::warn1(theWidget,
+ QObject::tr("WRN_VISU_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED"),
+ QObject::tr("BUT_OK"));
+ return true;
+ }
return false;
}
Handle(SALOME_InteractiveObject)* theIO,
VISU::Storable::TRestoringMap* theMap)
{
- if (CheckLock(GetCStudy(GetAppStudy(theModule))))
+ if (CheckLock(GetCStudy(GetAppStudy(theModule)),GetDesktop(theModule)))
return NULL;
CORBA::Object_var anObject = GetSelectedObj(theModule, theIO);
return true;
}
- //************************************************************
// Display/Erase
void
}
void
- DeleteSObject (SalomeApp_Module* theModule,
- _PTR(Study) theStudy,
- _PTR(SObject) theSObject)
+ DeleteSObject(VisuGUI* theModule,
+ _PTR(Study) theStudy,
+ _PTR(SObject) theSObject)
{
- SalomeApp_Study* study = GetAppStudy( theModule );
-
_PTR(ChildIterator) aChildIter = theStudy->NewChildIterator(theSObject);
for (aChildIter->InitEx(true); aChildIter->More(); aChildIter->Next()) {
_PTR(SObject) aChildSObject = aChildIter->Value();
CORBA::Object_var aChildObj = VISU::ClientSObjectToObject(aChildSObject);
+ RemoveScalarBarPosition(theModule,aChildObj);
ErasePrs(theModule, aChildObj);
}
CORBA::Object_var anObj = VISU::ClientSObjectToObject(theSObject);
if (!CORBA::is_nil(anObj)) {
+ RemoveScalarBarPosition(theModule,anObj);
ErasePrs(theModule, anObj);
VISU::RemovableObject_var aRemovableObject = VISU::RemovableObject::_narrow(anObj);
}
void
- DeletePrs3d(SalomeApp_Module* theModule,
+ DeletePrs3d(VisuGUI* theModule,
VISU::Prs3d_i* thePrs,
const Handle(SALOME_InteractiveObject)& theIO)
{
if (!thePrs)
return;
- if (CheckLock(GetCStudy(GetAppStudy(theModule))))
+ if (CheckLock(GetCStudy(GetAppStudy(theModule)),GetDesktop(theModule)))
return;
- SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
- CORBA::String_var anEntry = aSObject->GetID();
- LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(theModule);
- Remove(aSelectionMgr,theIO);
- TViewWindows aViewWindows = GetViews(theModule);
- for(int i = 0, iEnd = aViewWindows.size(); i < iEnd; i++){
- SVTK_ViewWindow* aView = aViewWindows[i];
- if(VISU_Actor* anActor = FindActor(aView,anEntry.in())){
- aView->RemoveActor(anActor);
- anActor->Delete();
- }
- }
+
+ RemoveScalarBarPosition(theModule,thePrs);
thePrs->RemoveFromStudy();
}
VISU::Prs3d_i* thePrs)
{
if ( SVTK_ViewWindow* vw = GetViewWindow( theModule ) ){
- VISU_Actor* anVISUActor = FindActor( vw, thePrs );
- if (anVISUActor) {
+ if (VISU_Actor* anVISUActor = FindActor( vw, thePrs )) {
anVISUActor->VisibilityOff();
}
}
}
- //************************************************************
// Presentation management
void
}
}
- //************************************************************
// SObject type
bool
return dynamic_cast<VISU::Result_i*>(VISU::GetServant(anObject).in());
}
- //************************************************************
// Views
SUIT_ViewWindow* GetActiveView(const SalomeApp_Module* theModule, QString theType)
return 0;
}
- //************************************************************
// VTK View
TViewWindows
return wnd;
else
{
- if(SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate ))
- return dynamic_cast<SVTK_ViewWindow*>( aViewManager->getActiveView() );
+ SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate );
+ return aViewManager ? dynamic_cast<SVTK_ViewWindow*>( aViewManager->getActiveView() ) : 0;
}
}
return NULL;
vtkRenderer *aRen = vw->getRenderer();
vtkActorCollection *anActColl = aRen->GetActors();
+ anActColl->InitTraversal();
vtkActor *anActor;
VISU_Actor* anVISUActor = NULL;
VISU_Actor* aResActor = NULL;
- for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL; ){
- if(!SALOME_Actor::SafeDownCast(anActor))
- continue;
- if(anActor->IsA("VISU_Actor")){
- anVISUActor = VISU_Actor::SafeDownCast(anActor);
+ while(vtkActor *anActor = anActColl->GetNextActor()){
+ anVISUActor = VISU_Actor::SafeDownCast(anActor);
+ if(anVISUActor){
VISU::Prs3d_i* aPrs = anVISUActor->GetPrs3d();
if(aPrs == NULL) continue;
if (thePrs == aPrs) {
- aResActor = anVISUActor;
try {
+ aResActor = anVISUActor;
thePrs->UpdateActor(aResActor);
aResActor->VisibilityOn();
} catch (std::runtime_error& ex) {
}
return aList;
}
+
+ int GetFreePositionOfDefaultScalarBar(VisuGUI* theModule){
+ int minIndx = 1;
+ std::set<int> aIndexes;
+ SVTK_ViewWindow* vw = GetViewWindow(theModule);
+ TViewToPrs3d aMap = theModule->getScalarBarsMap();
+ TViewToPrs3d::const_iterator aViewToPrsIter = aMap.find(vw);
+ if (aViewToPrsIter != aMap.end()){
+ TSetPrs3d::const_iterator aPrsIter = (aViewToPrsIter->second).begin();
+ for(;aPrsIter!=(aViewToPrsIter->second).end();aPrsIter++){
+ aIndexes.insert((*aPrsIter).second);
+ }
+ }
+ std::set<int>::const_iterator aIter = aIndexes.begin();
+ for (int i=1,length=aIndexes.size(); i <= length; i++){
+ std::set<int>::const_iterator aIter = aIndexes.find(i);
+ if(aIter==aIndexes.end()){minIndx = i;break;}
+ else minIndx = i + 1;
+
+ }
+ return minIndx;
+ }
+
+ void AddScalarBarPosition(VisuGUI* theModule,VISU::Prs3d_i* thePrs3d, int pos){
+ SVTK_ViewWindow* vw = GetViewWindow(theModule);
+ TViewToPrs3d& aMap = theModule->myScalarBarsMap;
+ TPrs3dToInd aPair; aPair.first=thePrs3d; aPair.second=pos;
+ aMap[vw].insert(aPair);
+ }
+
+ void RemoveScalarBarPosition(VisuGUI* theModule,SVTK_ViewWindow* vw,VISU::Prs3d_i* thePrs3d){
+ TViewToPrs3d& aMap = theModule->myScalarBarsMap;
+ TSetPrs3d::iterator aIter = aMap[vw].begin();
+ for(;aIter!=aMap[vw].end();aIter++)
+ if((*aIter).first == thePrs3d){
+ aMap[vw].erase(*aIter);
+ return;
+ }
+ }
+
+ void RemoveScalarBarPosition(VisuGUI* theModule,VISU::Prs3d_i* thePrs3d){
+ SVTK_ViewWindow* vw = GetViewWindow(theModule);
+ RemoveScalarBarPosition(theModule,vw,thePrs3d);
+ }
+
+ void RemoveScalarBarPosition(VisuGUI* theModule,CORBA::Object_ptr theObject){
+ if (!CORBA::is_nil(theObject)) {
+ Base_var aBase = Base::_narrow(theObject);
+ if (CORBA::is_nil(aBase)) return;
+ if (VISU::Prs3d_i* aPrsObject = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(aBase).in())){
+ RemoveScalarBarPosition(theModule,aPrsObject);
+ }
+ }
+ }
}
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(MED_Gen)
+class QWidget;
+
class SUIT_Desktop;
class SUIT_ViewWindow;
class VISU_Actor;
class LightApp_SelectionMgr;
class SalomeApp_Module;
class SalomeApp_Study;
+class VisuGUI;
namespace VISU {
class Prs3d_i;
_PTR(Study) GetCStudy(const SalomeApp_Study* theStudy);
bool IsStudyLocked( _PTR(Study) theStudy );
- bool CheckLock( _PTR(Study) theStudy );
+ bool CheckLock( _PTR(Study) theStudy,
+ QWidget* theWidget );
void UpdateObjBrowser(SalomeApp_Module* theModule,
bool theIsUpdateDataModel = true,
void ErasePrs(const SalomeApp_Module* theModule,
CORBA::Object_ptr theObject,
bool theUpdate = true);
- void DeleteSObject(SalomeApp_Module* theModule,
+ void DeleteSObject(VisuGUI* theModule,
_PTR(Study) theStudy,
_PTR(SObject) theSObject);
- void DeletePrs3d(SalomeApp_Module* theModule,
+ void DeletePrs3d(VisuGUI* theModule,
VISU::Prs3d_i* thePrs,
const Handle(SALOME_InteractiveObject)& theIO);
void ErasePrs3d(const SalomeApp_Module* theModule,
const Handle(SALOME_InteractiveObject)& theIO);
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
_PTR(SObject) theObject);
+
+ int GetFreePositionOfDefaultScalarBar(VisuGUI* theModule);
+ void AddScalarBarPosition(VisuGUI* theModule,VISU::Prs3d_i* thePrs3d, int pos);
+ void RemoveScalarBarPosition(VisuGUI* theModule,VISU::Prs3d_i* thePrs3d);
+ void RemoveScalarBarPosition(VisuGUI* theModule,SVTK_ViewWindow* vw,VISU::Prs3d_i* thePrs3d);
+ void RemoveScalarBarPosition(VisuGUI* theModule,CORBA::Object_ptr theObject);
}
#endif
#ifdef _DEBUG_
static int MYDEBUG = 0;
+//#define _DEXCEPT_
#else
static int MYDEBUG = 0;
#endif
myHeight = (myOrientation == VISU::ScalarMap::VERTICAL)? 0.8:0.12;
myHeight = aResourceMgr->doubleValue("VISU", propertyName + "height", myHeight);
+ // scalar bar default position
+ bool anIsArrangeBar = aResourceMgr->booleanValue("VISU", "scalar_bars_default_position", 0);
+ int aPlace = 1;
+ if (anIsArrangeBar){
+ aPlace = aResourceMgr->integerValue("VISU", "scalar_bar_position_num",0);
+ }
+ if(myOrientation == VISU::ScalarMap::HORIZONTAL){
+ myPosition[1] += myHeight*(aPlace-1);
+ } else {
+ myPosition[0] += myWidth*(aPlace-1);
+ }
+
// Nb of Labels
myNumberOfLabels = aResourceMgr->integerValue( "VISU", "scalar_bar_num_labels", 5 );
SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
if(myAddToStudy)
aStudyBuilder->NewCommand(); // There is a transaction
+#ifndef _DEXCEPT_
try{
+#endif
DoSetInput(myResult);
QString aComment;
myName = "NoName";
CreateAttributes(myStudy,anEntry.c_str(),aRefFatherEntry.c_str(),anIOR,myName.c_str(),"",aComment.latin1(),true);
mySObject = myStudy->FindObjectIOR(anIOR);
}
+#ifndef _DEXCEPT_
}catch(std::exception& exc){
INFOS("Follow exception was occured :\n"<<exc.what());
throw;
INFOS("Unknown exception was occured!");
throw;
}
+#endif
if(myAddToStudy)
aStudyBuilder->CommitCommand();
return this;