From: Cédric Aguerre Date: Fri, 4 Nov 2016 13:49:03 +0000 (+0100) Subject: tests - fix view management X-Git-Tag: V8_2_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4637e5136b5bc9751769f058f63c405a3e910943;p=modules%2Fparavis.git tests - fix view management --- 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)