Changeset 5a54aa4 in sasview
- Timestamp:
- Jul 11, 2016 4:36:55 AM (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.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 033c14c
- Parents:
- 275b448
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/08/16 06:28:54)
- git-committer:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
- Location:
- src/sas/sasgui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
r3901e7c r5a54aa4 95 95 self.parent.SetFocus() 96 96 97 # If true, there are 3 qrange bars 98 self.is_corfunc = False 99 97 100 98 101 def get_symbol_label(self): … … 214 217 if active_ctrl == None: 215 218 return 219 if hasattr(event, 'is_corfunc'): 220 self.is_corfunc = event.is_corfunc 216 221 if event.id in self.plots.keys(): 217 222 ctrl = event.ctrl … … 296 301 ly0x = ly[0].get_xdata() 297 302 ly1x = ly[1].get_xdata() 303 ly2x = None 304 if self.is_corfunc: ly2x = ly[2].get_xdata() 298 305 self.q_ctrl[0].SetBackgroundColour('white') 299 306 self.q_ctrl[1].SetBackgroundColour('white') … … 309 316 self.q_ctrl[0].SetValue(str(pos_x)) 310 317 self.q_ctrl[1].SetBackgroundColour('pink') 318 elif ly2x is not None and ly1x >= ly2x: 319 if self.vl_ind == 1: 320 ly[2].set_xdata(posx) 321 ly[2].set_zorder(nop) 322 self.q_ctrl[2].SetValue(str(pos_x)) 323 elif self.vl_ind == 2: 324 ly[1].set_xdata(posx) 325 ly[1].set_zorder(nop) 326 self.q_ctrl[1].SetValue(str(pos_x)) 327 311 328 312 329 def _get_cusor_lines(self, event): … … 328 345 dqmin = math.fabs(event.xdata - self.ly[0].get_xdata()) 329 346 dqmax = math.fabs(event.xdata - self.ly[1].get_xdata()) 330 is_qmax = dqmin > dqmax 331 if is_qmax: 332 self.vl_ind = 1 347 if not self.is_corfunc: 348 is_qmax = dqmin > dqmax 349 if is_qmax: 350 self.vl_ind = 1 351 else: 352 self.vl_ind = 0 333 353 else: 334 self.vl_ind = 0 354 dqmax2 = math.fabs(event.xdata - self.ly[2].get_xdata()) 355 closest = min(dqmin, dqmax, dqmax2) 356 self.vl_ind = { dqmin: 0, dqmax: 1, dqmax2: 2 }.get(closest) 335 357 336 358 def cusor_line(self, event): -
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r275b448 r5a54aa4 241 241 wx.PostEvent(self._manager.parent, PlotQrangeEvent( 242 242 ctrl=[self._qmin_input, self._qmax1_input, self._qmax2_input], 243 active=active_ctrl, id=IQ_DATA_LABEL, 243 active=active_ctrl, id=IQ_DATA_LABEL, is_corfunc=True, 244 244 group_id=GROUP_ID_IQ_DATA, leftdown=False)) 245 245
Note: See TracChangeset
for help on using the changeset viewer.