Commit 017616ad authored by eric pellegrini's avatar eric pellegrini

Minor changed related to GUI and older (closed) issues

parent f8525499
Pipeline #4227 failed with stages
in 34 minutes and 19 seconds
......@@ -66,11 +66,11 @@ class JobTemplateEditor(wx.Dialog):
panelSizer = wx.BoxSizer(wx.VERTICAL)
panelSizer.Add(staticLabel0, 0, wx.ALL|wx.ALIGN_LEFT, 5)
subsizer = wx.GridBagSizer(5,5)
#subsizer.AddGrowableCol(1)
subsizer.Add(staticLabel1,pos=(0,0),flag=wx.ALIGN_CENTER_VERTICAL)
subsizer.Add(self._shortName ,pos=(0,1),flag=wx.ALIGN_CENTER_VERTICAL|wx.EXPAND)
subsizer.Add(staticLabel2,pos=(1,0),flag=wx.ALIGN_CENTER_VERTICAL)
subsizer.Add(self._className,pos=(1,1),flag=wx.ALIGN_CENTER_VERTICAL|wx.EXPAND)
subsizer.AddGrowableCol(1)
subPanel.SetSizer(subsizer)
panelSizer.Add(subPanel, 0, wx.ALL|wx.EXPAND, 5)
panel.SetSizer(panelSizer)
......
......@@ -38,6 +38,8 @@ class ScaledLocator(matplotlib.ticker.MaxNLocator):
*x0*. For example, this would locate minutes on an axis plotted in seconds
if dx=60. This differs from MultipleLocator in that an approriate interval
of dx units will be chosen similar to the default MaxNLocator.
see https://stackoverflow.com/questions/9451395/customize-x-axis-in-matplotlib
"""
def __init__(self, dx=1.0, x0=0.0):
self.dx = dx
......
......@@ -138,11 +138,11 @@ class UserDefinitionViewer(wx.Dialog):
self._tree.SelectItem(item,True)
while item != self._root:
while True:
item = self._tree.GetItemParent(item)
# Check if item is not root (leading to crash otherwise)
if item != self._root:
self._tree.Expand(item)
if item == self._root:
break
self._tree.Expand(item)
def on_show_info(self, event=None):
......@@ -254,4 +254,4 @@ if __name__ == "__main__":
f = UserDefinitionViewer(None,ud=['protein_in_periodic_universe.nc','atom_selection',"sfdfdfsd"],editable=True)
f.ShowModal()
f.Destroy()
app.MainLoop()
\ No newline at end of file
app.MainLoop()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment