]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
tests - fix view management
authorCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 4 Nov 2016 13:49:03 +0000 (14:49 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 4 Nov 2016 15:23:30 +0000 (16:23 +0100)
test/VisuPrs/SWIG_scripts/B6.py
test/VisuPrs/SWIG_scripts/B9.py

index 9fc25ca61defb005a2b692f2baff364054a5458b..4133be897760d82afba64e0f1649280f5b013ec1 100644 (file)
@@ -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 ]'
index 72ddba7a0ae735b04e0aaa14afeca571a6a10b14..6a164667b950502641234312a2228640aca357be 100644 (file)
@@ -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)