]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Work of "Display only on creation" with CutLines has been corrected
authorepa <epa@opencascade.com>
Tue, 31 Oct 2006 17:23:16 +0000 (17:23 +0000)
committerepa <epa@opencascade.com>
Tue, 31 Oct 2006 17:23:16 +0000 (17:23 +0000)
src/VISUGUI/VisuGUI_Prs3dTools.h

index 4b09328266cdb63709639784fdd50c7a80ee0a64..a58eb941c950ece2944c328f91c7417e754fc7ca 100644 (file)
@@ -178,11 +178,18 @@ namespace VISU
     if (aPrs3d) {
       SUIT_ResourceMgr* aResourceMgr = GetResourceMgr();
       int aValue = aResourceMgr->integerValue("VISU","BuildDefaultPrs3d",0);
+      if(aResourceMgr->booleanValue("VISU","display_only",false)){
+         theModule->OnEraseAll();
+       }
+      
       if (!aValue) {
        if (TDlg* aDlg = new TDlg(theModule)) { // dialog box in creation mode
          aDlg->initFromPrsObject(aPrs3d);
 
            if (runAndWait(aDlg,IsDlgModal) && (aDlg->storeToPrsObject(aPrs3d))) {
+             if(aResourceMgr->booleanValue("VISU","display_only",false)){
+               if(SPlot2d_Viewer* aPlot2d = GetPlot2dViewer(theModule, false)) aPlot2d->EraseAll();
+             } 
              // Optionally, create table and curves for cut lines
              QApplication::setOverrideCursor(Qt::waitCursor);
              CreateCurves( theModule,
@@ -203,9 +210,6 @@ namespace VISU
       aViewWindow = GetViewWindow<TViewer>(theModule);
       // Display created presentation.
       if (aViewWindow) {
-        if(aResourceMgr->booleanValue("VISU","display_only",false)){
-         theModule->OnEraseAll();
-       }
        PublishInView(theModule, aPrs3d, aViewWindow, /*highlight = */true);
        aViewWindow->onFitAll();