From 93c8070cb60c4e4ec71adabcbe876b59e2166c48 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 19 May 2005 12:38:36 +0000 Subject: [PATCH] add CheckActiveStudyLock(); enable SameAs and fix checkHomoSelection() for PLOT3D --- src/VISUGUI/VisuGUI.cxx | 21 +++++++++++++++++++++ src/VISUGUI/VisuGUI.h | 1 + 2 files changed, 22 insertions(+) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 28f7edb4..9df977b8 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -414,6 +414,18 @@ static int checkLock(const SALOMEDS::Study_var& theStudy) { return false; } +//======================================================================= +//function : CheckActiveStudyLock +//purpose : return true if NOT locked, ie OK +//======================================================================= + +bool VisuGUI::CheckActiveStudyLock() +{ + //Document OCAF de l'etude active + SALOMEDS::Study_var aStudy = GetActiveStudy()->getStudyDocument(); + return !checkLock( aStudy ); +} + bool VisuGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) @@ -2694,6 +2706,14 @@ void VisuGUI::CopyPresentation(){ UpdateViewer(aSameVectors); } break; + case VISU::TPLOT3D: + { + VISU::Plot3D_i* aPlot3DPrs = dynamic_cast(aPrsObject); + VISU::Plot3D_i* aSamePlot3D = new VISU::Plot3D_i(aPlot3DPrs->GetResult()); + aSamePlot3D->SameAs(aPlot3DPrs); + UpdateViewer(aSamePlot3D); + } + break; } GetActiveStudy()->updateObjBrowser(); } @@ -2747,6 +2767,7 @@ int VisuGUI::checkHomoSelection() case VISU::TCUTLINES: case VISU::TVECTORS: case VISU::TSTREAMLINES: + case VISU::TPLOT3D: selNext = homoPresentations; break; case VISU::TFIELD: if (getValue(aSObject, "myNbTimeStamps").toLong() > 1) { diff --git a/src/VISUGUI/VisuGUI.h b/src/VISUGUI/VisuGUI.h index e4fb4591..9ea1684a 100644 --- a/src/VISUGUI/VisuGUI.h +++ b/src/VISUGUI/VisuGUI.h @@ -99,6 +99,7 @@ class VisuGUI : public SALOMEGUI{ static VISU::Storable::TRestoringMap getMapOfValue(SALOMEDS::SObject_var theSObject); static VISU::Result_i* CreatePresent(SALOMEDS::SObject_var theField, VISU::Result_var& theResult); + static bool CheckActiveStudyLock(); enum CameraOrient {e3D, eFront, eLeft, eTop}; static CameraOrient SetFitAll( VTKViewer_ViewFrame* vf); -- 2.39.2