Changeset 4342fed0 in sasview for src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
- Timestamp:
- Apr 9, 2017 8:09:12 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:
- fca1f50
- Parents:
- 5b2b04d (diff), 45dffa69 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Butler <butlerpd@…> (04/09/17 08:09:12)
- git-committer:
- GitHub <noreply@…> (04/09/17 08:09:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
r959eb01 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 … … 212 212 On Qmin Qmax vertical line event 213 213 """ 214 if event ==None:214 if event is None: 215 215 return 216 216 event.Skip() 217 217 active_ctrl = event.active 218 if active_ctrl ==None:218 if active_ctrl is None: 219 219 return 220 220 if hasattr(event, 'is_corfunc'): … … 231 231 colors.append('purple') 232 232 values.append(min(x_data.max(), float(ctrl[2].GetValue()))) 233 if self.ly ==None:233 if self.ly is None: 234 234 self.ly = [] 235 235 for c, v in zip(colors, values): … … 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: … … 336 336 if hasattr(event, "action"): 337 337 dclick = event.action == 'dclick' 338 if ax ==None or dclick:338 if ax is None or dclick: 339 339 # remove the vline 340 340 self._check_zoom_plot() … … 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()) … … 361 361 Move the cursor line to write Q range 362 362 """ 363 if self.q_ctrl ==None:363 if self.q_ctrl is None: 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) … … 370 370 return 371 371 ax = event.inaxes 372 if ax ==None or not hasattr(event, 'action'):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 … … 618 618 # add menu of other plugins 619 619 item_list = self.parent.get_current_context_menu(self) 620 if ( not item_list == None) and (not len(item_list) == 0):620 if (item_list is not None) and (len(item_list)): 621 621 for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 622 623 622 try: 624 623 plot_menu.Append(wx_id, item[0], name) … … 684 683 685 684 686 if self.position !=None:685 if self.position is not None: 687 686 wx_id = ids.next() 688 687 self._slicerpop.Append(wx_id, '&Add Text') … … 761 760 default_name = default_name.split('.')[0] 762 761 default_name += "_out" 763 if self.parent !=None:762 if self.parent is not None: 764 763 self.parent.save_data1d(data, default_name) 765 764 … … 779 778 default_name = default_name.split('.')[0] 780 779 # default_name += "_out" 781 if self.parent !=None:780 if self.parent is not None: 782 781 self.parent.show_data1d(data, default_name) 783 782 … … 811 810 curr_label = self.appearance_selected_plot.label 812 811 813 if curr_color ==None:812 if curr_color is None: 814 813 curr_color = self._color_labels['Blue'] 815 814 curr_symbol = 13
Note: See TracChangeset
for help on using the changeset viewer.