#include "OB_Browser.h"
-#include "SALOME_ListIO.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SalomeApp_Application.h"
OnCreateScalarMap()
{
CreatePrs3d<VISU::ScalarMap_i,VisuGUI_ScalarBarDlg,1>(this);
+
+ //LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
+ //aSelectionMgr->setSelectedObjects(mySelectedObjects);
}
LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
SALOME_ListIO aListIO;
aSelectionMgr->selectedObjects(aListIO);
+ mySelectedObjects = aListIO;
if (aListIO.Extent() < 1) return;
{
return myScalarBarsMap;
}
+
+void
+VisuGUI
+::selectedObjects( SALOME_ListIO& theList ) const
+{
+ theList = mySelectedObjects;
+}
+
LightApp_Displayer* VisuGUI::displayer()
{
if( !myDisplayer )
class ColoredPrs3d_i;
class CutLines_i;
+ //---------------------------------------------------------------
+ inline
+ void
+ RestoreSelection(VisuGUI* theModule)
+ {
+ SALOME_ListIO aList;
+ theModule->selectedObjects(aList);
+ LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(theModule);
+ aSelectionMgr->setSelectedObjects(aList);
+ }
+
//---------------------------------------------------------------
inline
int
template<class TPrs3d_i, class TViewer, class TDlg, int TIsDlgModal>
void
EditPrs3d(VisuGUI* theModule,
+ Handle(SALOME_InteractiveObject)& theIO,
VISU::Prs3d_i* thePrs3d,
SVTK_ViewWindow* theViewWindow)
{
QObject::tr("BUT_OK"));
}
if (theViewWindow) {
+ theViewWindow->highlight(theIO, 1);
theViewWindow->getRenderer()->ResetCameraClippingRange();
theViewWindow->Repaint();
}
aDlg,
false ); // in edition mode
QApplication::restoreOverrideCursor();
+
+ RestoreSelection(theModule);
+
}
delete aDlg;
}
// Create SVTK_ViewWindow, if it does not exist
aViewWindow = GetViewWindow<SVTK_Viewer>(theModule);
if (aViewWindow) {
- EditPrs3d<TPrs3d_i,SVTK_Viewer,TDlg,TIsDlgModal>(theModule, thePrs3d, aViewWindow);
- aViewWindow->highlight(theIO, 1);
+ EditPrs3d<TPrs3d_i,SVTK_Viewer,TDlg,TIsDlgModal>(theModule, theIO, thePrs3d, aViewWindow);
}
}
if (!CreateAndEditPrs3d<TPrs3d_i,TViewer,TDlg,IsDlgModal>(theModule,theTimeStampSObj,theIO,thePublishInStudyMode))
return;
+ RestoreSelection(theModule);
+
theModule->application()->putInfo(QObject::tr("INF_DONE"));
}
CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,IsDlgModal>
(theModule,aTimeStampSObj,anIO,aPublishInStudyMode);
else
- CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,IsDlgModal>
+ CreatePrs3dInViewer<TPrs3d_i,SVTK_Viewer,TDlg,IsDlgModal>
(theModule,aTimeStampSObj,anIO,aPublishInStudyMode);
}
}