Changeset 7432acb in sasview for src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
- Timestamp:
- Apr 9, 2017 6:11:31 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 45dffa69
- Parents:
- ac07a3a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
rac07a3a r7432acb 183 183 # So manually recode the size (=x_size) and compare here. 184 184 # Massy code to work around:< 185 if self.parent._mgr !=None:185 if self.parent._mgr is not None: 186 186 max_panel = self.parent._mgr.GetPane(self) 187 187 if max_panel.IsMaximized(): 188 188 self.parent._mgr.RestorePane(max_panel) 189 189 max_panel.Maximize() 190 if self.x_size !=None:190 if self.x_size is not None: 191 191 if self.x_size == self.GetSize(): 192 192 self.resizing = False … … 241 241 xval = float(active_ctrl.GetValue()) 242 242 position = self.get_data_xy_vals(xval) 243 if position !=None and not self.is_corfunc:243 if position is not None and not self.is_corfunc: 244 244 wx.PostEvent(self.parent, StatusEvent(status=position)) 245 245 except: … … 342 342 self.q_ctrl = None 343 343 return 344 if self.ly != None and event.xdata !=None:344 if self.ly is not None and event.xdata is not None: 345 345 # Selecting a new line if cursor lines are displayed already 346 346 dqmin = math.fabs(event.xdata - self.ly[0].get_xdata()) … … 364 364 return 365 365 # release a q range vline 366 if self.ly !=None and not self.leftdown:366 if self.ly is not None and not self.leftdown: 367 367 for ly in self.ly: 368 368 ly.set_alpha(0.7) … … 372 372 if ax is None or not hasattr(event, 'action'): 373 373 return 374 end_drag = event.action != 'drag' and event.xdata !=None374 end_drag = event.action != 'drag' and event.xdata is not None 375 375 nop = len(self.plots) 376 376 pos_x, _ = float(event.xdata), float(event.ydata) … … 514 514 ax = event.inaxes 515 515 PlotPanel.onLeftDown(self, event) 516 if ax !=None:516 if ax is not None: 517 517 try: 518 518 pos_x = float(event.xdata) # / size_x … … 683 683 684 684 685 if self.position !=None:685 if self.position is not None: 686 686 wx_id = ids.next() 687 687 self._slicerpop.Append(wx_id, '&Add Text') … … 760 760 default_name = default_name.split('.')[0] 761 761 default_name += "_out" 762 if self.parent !=None:762 if self.parent is not None: 763 763 self.parent.save_data1d(data, default_name) 764 764 … … 778 778 default_name = default_name.split('.')[0] 779 779 # default_name += "_out" 780 if self.parent !=None:780 if self.parent is not None: 781 781 self.parent.show_data1d(data, default_name) 782 782
Note: See TracChangeset
for help on using the changeset viewer.