Changeset 7fef474 in sasview
- Timestamp:
- Jun 19, 2008 2:10:18 PM (16 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:
- 9b85e93
- Parents:
- 3fd1ebc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/plottable_interactor.py
r4972de2 r7fef474 15 15 self._context_menu = False 16 16 self._dragged = False 17 self.connect_markers([self.axes]) 18 17 19 18 20 def _color(self,c): … … 85 87 86 88 def _on_click(self, evt): 87 self._context_menu = False 89 """ 90 Called when a mouse button is clicked 91 from within the boundaries of an artist. 92 """ 93 if self._context_menu==True: 94 self._context_menu = False 95 evt.artist = self.marker 96 self._on_leave(evt) 97 88 98 89 99 def _on_release(self, evt): 100 """ 101 Called when a mouse button is released 102 within the boundaries of an artist 103 """ 90 104 # Check to see whether we are about to pop 91 105 # the context menu up … … 94 108 95 109 def _on_enter(self, evt): 96 self.base.plottable_selected(self.id) 97 evt.artist.set_color('y') 98 if hasattr(evt.artist, "set_facecolor"): 99 evt.artist.set_facecolor('y') 100 if hasattr(evt.artist, "set_edgecolor"): 101 evt.artist.set_edgecolor('y') 102 self.axes.figure.canvas.draw_idle() 110 """ 111 Called when we are entering the boundaries 112 of an artist. 113 """ 114 if not evt.artist.__class__.__name__=="Subplot": 115 116 self.base.plottable_selected(self.id) 117 evt.artist.set_color('y') 118 if hasattr(evt.artist, "set_facecolor"): 119 evt.artist.set_facecolor('y') 120 if hasattr(evt.artist, "set_edgecolor"): 121 evt.artist.set_edgecolor('y') 122 self.axes.figure.canvas.draw_idle() 103 123 104 124 def _on_leave(self, evt): 105 if self._context_menu==False: 106 self.base.plottable_selected(None) 107 evt.artist.set_color(self.color) 108 if hasattr(evt.artist, "set_facecolor"): 109 evt.artist.set_facecolor(self.color) 110 if hasattr(evt.artist, "set_edgecolor"): 111 evt.artist.set_edgecolor(self.color) 112 self.axes.figure.canvas.draw_idle() 113 114 self._context_menu = False 125 """ 126 Called when we are leaving the boundaries 127 of an artist. 128 """ 129 if not evt.artist.__class__.__name__=="Subplot": 130 if self._context_menu==False: 131 self.base.plottable_selected(None) 132 evt.artist.set_color(self.color) 133 if hasattr(evt.artist, "set_facecolor"): 134 evt.artist.set_facecolor(self.color) 135 if hasattr(evt.artist, "set_edgecolor"): 136 evt.artist.set_edgecolor(self.color) 137 self.axes.figure.canvas.draw_idle() 115 138 116 139 def update(self):
Note: See TracChangeset
for help on using the changeset viewer.