Changeset edc7852 in sasview
- Timestamp:
- May 22, 2017 4:03:30 PM (8 years ago)
- 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 47d93073
- Parents:
- 324e0bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py
r324e0bf redc7852 20 20 "BoxInteractorX": "SlabX", 21 21 "BoxInteractorY": "SlabY"} 22 BINNING_OPTIONS = {"Linear" : 0, 23 "Logarithmic" : 10,} 22 24 23 25 … … 47 49 self.path = None 48 50 self.fitting_options = None 51 self.bin_ctl = None 49 52 self.type_list = [] 50 53 self.loaded_data = [] … … 101 104 keys.sort() 102 105 for item in keys: 106 ix = 0 103 107 iy += 1 104 ix = 0 105 if item not in ["count", "errors"]: 108 if item not in ["count", "errors", "binning base"]: 106 109 text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT) 107 110 self.bck.Add(text, (iy, ix), (1, 1), … … 121 124 self.bck.Add((20, 20), (iy, ix), (1, 1), 122 125 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 126 elif item == 'binning base': 127 text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT) 128 self.bck.Add(text, (iy, ix), (1, 1), 129 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 130 options = BINNING_OPTIONS.keys() 131 self.bin_ctl = wx.ComboBox(parent=self, choices=options) 132 hint_msg = "Modify the value of %s to change" % item 133 hint_msg += " the 2D slicer" 134 self.bin_ctl.SetToolTipString(hint_msg) 135 ix = 1 136 result = "" 137 value = 0 138 for name, value in BINNING_OPTIONS.items(): 139 if value == params[item]: 140 result = name 141 break 142 index = self.bin_ctl.FindString(result) 143 self.bin_ctl.SetSelection(index) 144 self.parameters.append([item, self.bin_ctl]) 145 self.Bind(wx.EVT_COMBOBOX, self.on_text_enter) 146 self.bck.Add(self.bin_ctl, (iy, ix), (1, 1), 147 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 148 ix = 3 149 self.bck.Add((20, 20), (iy, ix), (1, 1), 150 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 123 151 else: 124 152 text = wx.StaticText(self, -1, item + " : ", … … 251 279 for item in self.parameters: 252 280 try: 281 if item[0] == "binning base": 282 title = self.bin_ctl.GetValue() 283 params["binning base"] = BINNING_OPTIONS.get(title) 284 continue 253 285 params[item[0]] = float(item[1].GetValue()) 254 286 item[1].SetBackgroundColour(
Note: See TracChangeset
for help on using the changeset viewer.