From 4637e5136b5bc9751769f058f63c405a3e910943 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 4 Nov 2016 14:49:03 +0100 Subject: [PATCH] tests - fix view management --- test/VisuPrs/SWIG_scripts/B6.py | 4 ---- test/VisuPrs/SWIG_scripts/B9.py | 12 +++++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test/VisuPrs/SWIG_scripts/B6.py b/test/VisuPrs/SWIG_scripts/B6.py index 9fc25ca6..4133be89 100644 --- a/test/VisuPrs/SWIG_scripts/B6.py +++ b/test/VisuPrs/SWIG_scripts/B6.py @@ -93,10 +93,6 @@ pvsimple.RenameSource("TEST table of real", ps_tr) ps_tr.UpdatePipeline() # Replace the current view with chart line one -cur_view = pvsimple.GetRenderView() -if cur_view: - delete_pv_object(cur_view) - xy_view1 = pvsimple.CreateXYPlotView() xy_view1.ChartTitle = 'TEST table of real' xy_view1.BottomAxisTitle = '[ Wt ]' diff --git a/test/VisuPrs/SWIG_scripts/B9.py b/test/VisuPrs/SWIG_scripts/B9.py index 72ddba7a..6a164667 100644 --- a/test/VisuPrs/SWIG_scripts/B9.py +++ b/test/VisuPrs/SWIG_scripts/B9.py @@ -24,7 +24,9 @@ from presentations import EntityType, ScalarMapOnField, CutPlanesOnField, delete import pvsimple # Get view -view1 = pvsimple.GetRenderView() +view = pvsimple.GetRenderView() +if view: + delete_pv_object(view) # Import MED file med_file = datadir + "pointe.med" @@ -36,6 +38,7 @@ pvsimple.OpenDataFile(med_file) med_reader = pvsimple.GetActiveSource() # Create presentations +view1 = pvsimple.CreateRenderView() scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp) pvsimple.ResetCamera(view1) @@ -48,7 +51,6 @@ source = cutlines.Input delete_pv_object(source) delete_pv_object(med_reader) -# Clear views from scalar bar and update views -for rview in pvsimple.GetRenderViews(): - rview.Representations.Clear() - pvsimple.Render(rview) +# Render views +pvsimple.Render(view1) +pvsimple.Render(view2) -- 2.39.2