Changeset cafa75f in sasview for src/sans/guiframe/local_perspectives/plotting
- Timestamp:
- Apr 2, 2014 4:04:01 PM (11 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 1829835
- Parents:
- 6771d94
- Location:
- src/sans/guiframe/local_perspectives/plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
rb9f6d83 rcafa75f 173 173 self.graph.reset() 174 174 self.plots = {} 175 if self.is_zoomed: 176 self.is_zoomed = False 175 self.is_zoomed = False 177 176 178 177 def _OnReSize(self, event): … … 480 479 try: 481 480 self._onEVT_FUNC_PROPERTY() 482 except :481 except Exception, exc: 483 482 msg=" Encountered singular points..." 484 483 wx.PostEvent(self.parent, StatusEvent(status=\ 485 "Plotting Error: %s"% msg, info="error")) 486 # Check if zoomed 487 try: tb = self.toolbar.wx_ids['Back'] 488 except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 489 toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 490 if self.is_zoomed or toolbar_zoomed: 484 "Plotting Error: %s"% str(exc), info="error")) 485 if self.is_zoomed: 491 486 # Recover the x,y limits 492 487 self.subplot.set_xlim((xlo, xhi)) … … 502 497 # MAC: forcing to plot 2D avg 503 498 self.canvas._onDrawIdle() 504 except :499 except Exception,exc: 505 500 msg=" Encountered singular points..." 506 501 wx.PostEvent(self.parent, StatusEvent(status=\ 507 "Plotting Error: %s"% msg, info="error"))502 "Plotting Error: %s"% str(exc), info="error")) 508 503 self.toolbar.update() 509 if self.is_zoomed: 510 self.is_zoomed = False 504 self.is_zoomed = False 511 505 # Update Graph menu and help string 512 506 #pos = self.parent._window_menu.FindItem(self.window_caption) … … 566 560 self.graph.render(self) 567 561 self.subplot.figure.canvas.draw_idle() 568 # Check if zoomed 569 try: tb = self.toolbar.wx_ids['Back'] 570 except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 571 toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 572 if self.is_zoomed or toolbar_zoomed: 562 if self.is_zoomed: 573 563 # Recover the x,y limits 574 564 self.subplot.set_xlim((xlo, xhi)) -
src/sans/guiframe/local_perspectives/plotting/Plotter2D.py
rb9f6d83 rcafa75f 249 249 self.default_zmin_ctl = self.zmin_2D 250 250 self.default_zmax_ctl = self.zmax_2D 251 # Check if zoomed 252 try: tb = self.toolbar.wx_ids['Back'] 253 except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 254 toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 255 if not self.is_zoomed and not toolbar_zoomed: 251 if not self.is_zoomed: 256 252 return 257 253 # Recover the x,y limits … … 263 259 else: 264 260 self.toolbar.update() 265 self. _is_zoomed = False261 self.is_zoomed = False 266 262 267 263 def _set_axis_labels(self):
Note: See TracChangeset
for help on using the changeset viewer.