Skip to content

Commit

Permalink
Merge pull request #343 from prabhuramachandran/persist-viewer-size
Browse files Browse the repository at this point in the history
Add IDs to the viewer so the sizes persist.
  • Loading branch information
prabhuramachandran committed Mar 4, 2022
2 parents 269c4bc + d154e5c commit bded29f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pysph/tools/mayavi_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class InterpolatorView(HasTraits):
Item(name='set_bounds', show_label=False),
Item(name='recompute_bounds', show_label=False),
Item(name='show_legend'),
id='pysph.mayavi_viewer.interpolator_view'
)

# Private protocol ###################################################
Expand Down Expand Up @@ -386,7 +387,8 @@ class ParticleArrayHelper(HasTraits):
label='Vectors',
),
layout='tabbed'
)
),
id='pysph.mayavi_viewer.particle_array_helper'
)

# Private protocol ############################################
Expand Down Expand Up @@ -632,7 +634,10 @@ def _extra_scalars_default(self):

class PythonShellView(HasTraits):
ns = Dict()
view = View(Item('ns', editor=ShellEditor(), show_label=False))
view = View(
Item('ns', editor=ShellEditor(), show_label=False),
id='pysph.mayavi_viewer.python_shell_view'
)


class ViewerHandler(Handler):
Expand Down Expand Up @@ -812,10 +817,12 @@ class MayaviViewer(HasTraits):
Group(
Item('scene', editor=SceneEditor(scene_class=MayaviScene),
height=400, width=600, show_label=False),
)
),
id='pysph.mayavi_viewer.hsplit'
),
resizable=True,
title='PySPH Particle Viewer',
id='pysph.mayavi_viewer.viewer',
height=640,
width=1024,
handler=ViewerHandler
Expand Down

0 comments on commit bded29f

Please sign in to comment.