{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::ScalarMap_i, VisuGUI_ScalarBarDlg>(this, aPrs3d);
+ EditPrs3d<VISU::ScalarMap_i, VisuGUI_ScalarBarDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::DeformedShape_i, VisuGUI_DeformedShapeDlg>(this, aPrs3d);
+ EditPrs3d<VISU::DeformedShape_i, VisuGUI_DeformedShapeDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::CutPlanes_i, VisuGUI_CutPlanesDlg>(this, aPrs3d);
+ EditPrs3d<VISU::CutPlanes_i, VisuGUI_CutPlanesDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::CutLines_i, VisuGUI_CutLinesDlg>(this, aPrs3d);
+ EditPrs3d<VISU::CutLines_i, VisuGUI_CutLinesDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg>(this, aPrs3d);
+ EditPrs3d<VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::Vectors_i, VisuGUI_VectorsDlg>(this, aPrs3d);
+ EditPrs3d<VISU::Vectors_i, VisuGUI_VectorsDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::StreamLines_i, VisuGUI_StreamLinesDlg>(this, aPrs3d);
+ EditPrs3d<VISU::StreamLines_i, VisuGUI_StreamLinesDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::Plot3D_i, VisuGUI_Plot3DDlg>(this, aPrs3d);
+ EditPrs3d<VISU::Plot3D_i, VisuGUI_Plot3DDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
#include "VisuGUI_Tools.h"
+int runAndWait( QDialog* dlg, const bool modal )
+{
+ if( modal )
+ return dlg->exec();
+
+ dlg->show();
+
+ qApp->enter_loop();
+
+ return dlg->result();
+}
+
namespace VISU
{
class CutLines_i;
//---------------------------------------------------------------
- template<class TPrs3d_i, class TDlg>
+ template<class TPrs3d_i, class TDlg, int IsDlgModal >
void
EditPrs3d (SalomeApp_Module* theModule, VISU::Prs3d_i* thePrs3d)
{
if (aPrsObject) {
TDlg* aDlg = new TDlg (theModule);
aDlg->initFromPrsObject(aPrsObject);
- if (aDlg->exec()) {
+ if (runAndWait(aDlg,IsDlgModal)) {
if (!(aDlg->storeToPrsObject(aPrsObject))) {
delete aDlg;
return;
if(!aValue){
if(TDlg* aDlg = new TDlg(theModule)){ // dialog box in creation mode
aDlg->initFromPrsObject(aPrs3d);
- if(IsDlgModal)
- if(aDlg->exec() && (aDlg->storeToPrsObject(aPrs3d))) {
+
+ if(runAndWait(aDlg,IsDlgModal) && (aDlg->storeToPrsObject(aPrs3d))) {
// Optionally, create table and curves for cut lines
QApplication::setOverrideCursor(Qt::waitCursor);
CreateCurves( theModule,
delete aDlg;
return false;
}
- else{
- aDlg->show();
- return true;
- }
}
}
PublishInView(theModule,aPrs3d);