From 2d46d7e84222771d935a9f8321cbb970e1d225cd Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 23 Jul 2021 18:23:21 +0200 Subject: [PATCH] show flags for all tabs; better default tab logic --- slic/gui/daqframe.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/slic/gui/daqframe.py b/slic/gui/daqframe.py index aee54043..47e7883d 100644 --- a/slic/gui/daqframe.py +++ b/slic/gui/daqframe.py @@ -9,7 +9,7 @@ from .persist import Persistence class DAQFrame(wx.Frame): - def __init__(self, scanner, title="Neat DAQ", show_static=True, show_scan=True, show_spec=False): + def __init__(self, scanner, title="Neat DAQ", show_static=True, show_scan=True, show_spec=False, show_tweak=True, show_goto=False): wx.Frame.__init__(self, None, title=title)#, size=(350,200)) self.SetIcon(get_wx_icon()) @@ -31,10 +31,13 @@ class DAQFrame(wx.Frame): if show_static: notebook.AddPage(panel_static) if show_scan: notebook.AddPage(panel_scan) if show_spec: notebook.AddPage(panel_spec) - notebook.AddPage(panel_tweak) - notebook.AddPage(panel_goto) + if show_tweak: notebook.AddPage(panel_tweak) + if show_goto: notebook.AddPage(panel_goto) - notebook.SetSelection(-3) #TODO + if show_spec: notebook.SelectPage(panel_spec) + elif show_scan: notebook.SelectPage(panel_scan) + elif show_static: notebook.SelectPage(panel_static) + else: notebook.SelectPage(panel_config) # make sure the window is large enough sizer = wx.BoxSizer(wx.VERTICAL)