Ignore:
Timestamp:
Oct 21, 2015 8:35:00 AM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
85130cb
Parents:
2d88fc4
Message:

clean up wx id handling in fitting perspective

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/fitting_widgets.py

    r2f4b430 r6f16e25  
    4141        """ 
    4242        vbox = wx.BoxSizer(wx.VERTICAL) 
    43         box_description = wx.StaticBox(self, -1, str("Hint")) 
     43        box_description = wx.StaticBox(self, wx.ID_ANY, str("Hint")) 
    4444        hint_sizer = wx.StaticBoxSizer(box_description, wx.VERTICAL) 
    4545        selection_sizer = wx.GridBagSizer(5, 5) 
    4646        button_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    47         self.data_1d_selected = wx.RadioButton(self, -1, 'Data1D', 
     47        self.data_1d_selected = wx.RadioButton(self, wx.ID_ANY, 'Data1D', 
    4848                                                style=wx.RB_GROUP) 
    49         self.data_2d_selected = wx.RadioButton(self, -1, 'Data2D') 
     49        self.data_2d_selected = wx.RadioButton(self, wx.ID_ANY, 'Data2D') 
    5050        self.data_1d_selected.SetValue(True) 
    5151        self.data_2d_selected.SetValue(False) 
     
    5555        hint = "Selected Data set contains both 1D and 2D Data.\n" 
    5656        hint += "Please select on type of analysis before proceeding.\n" 
    57         hint_sizer.Add(wx.StaticText(self, -1, hint)) 
     57        hint_sizer.Add(wx.StaticText(self, wx.ID_ANY, hint)) 
    5858        #draw area containing radio buttons 
    5959        ix = 0 
     
    7272        vbox.Add(hint_sizer, 0, wx.EXPAND | wx.ALL, 10) 
    7373        vbox.Add(selection_sizer, 0, wx.TOP | wx.BOTTOM, 10) 
    74         vbox.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0) 
     74        vbox.Add(wx.StaticLine(self, wx.ID_ANY), 0, wx.EXPAND, 0) 
    7575        vbox.Add(button_sizer, 0, wx.TOP | wx.BOTTOM, 10) 
    7676        self.SetSizer(vbox) 
     
    103103            return 
    104104        select_data_text = " %s Data selected.\n" % str(self._nb_selected_data) 
    105         self._data_text_ctrl = wx.StaticText(self, -1, str(select_data_text)) 
     105        self._data_text_ctrl = wx.StaticText(self, wx.ID_ANY, str(select_data_text)) 
    106106 
    107107        self._data_text_ctrl.SetForegroundColour('blue') 
     
    126126            text += "for adequate plot display size. \n" 
    127127            text += "unchecked data won't be send to fitting . \n" 
    128         text_ctrl = wx.StaticText(self, -1, str(text)) 
     128        text_ctrl = wx.StaticText(self, wx.ID_ANY, str(text)) 
    129129        self._sizer_txt.Add(text_ctrl) 
    130130        iy = 0 
     
    133133        for i in range(len(data_list)): 
    134134            data_count += 1 
    135             cb = wx.CheckBox(self._panel, -1, str(data_list[i].name), (10, 10)) 
     135            cb = wx.CheckBox(self._panel, wx.ID_ANY, str(data_list[i].name), (10, 10)) 
    136136            wx.EVT_CHECKBOX(self, cb.GetId(), self._count_selected_data) 
    137137            if data_count <= MAX_NBR_DATA: 
     
    153153        self._sizer_button.Add(button_OK, 0, 
    154154                                wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10) 
    155         static_line = wx.StaticLine(self, -1) 
     155        static_line = wx.StaticLine(self, wx.ID_ANY) 
    156156        self._sizer_txt.Add(self._panel, 0, wx.EXPAND | wx.ALL, 10) 
    157157        self._sizer_main.Add(self._sizer_txt, 0, wx.EXPAND | wx.ALL, 10) 
Note: See TracChangeset for help on using the changeset viewer.