Changeset fa1cbee in sasview for src/sas/sasgui/plottools
- Timestamp:
- Aug 15, 2016 11:21:17 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- e767897, 18a1f2b
- Parents:
- 70308f6c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/PlotPanel.py
r2f12acc rfa1cbee 150 150 #List of texts currently on the plot 151 151 self.textList = [] 152 self.selectedText = None 152 153 #User scale 153 154 if xtransform != None: … … 352 353 self.leftdown = True 353 354 ax = event.inaxes 355 for text in self.textList: 356 if text.contains(event)[0]: # If user has clicked on text 357 self.selectedText = text 358 return 359 354 360 if ax != None: 355 361 self.xInit, self.yInit = event.xdata, event.ydata … … 373 379 self.mousemotion = False 374 380 self.leftup = True 381 self.selectedText = None 375 382 376 383 #release the legend … … 448 455 self._on_legend_motion(event) 449 456 return 457 458 if self.leftdown and self.selectedText is not None: 459 # User has clicked on text and is dragging 460 ax = event.inaxes 461 if ax != None: 462 # Only move text if mouse is within axes 463 self.selectedText.set_position((event.xdata, event.ydata)) 464 self._dragHelper(0, 0) 465 else: 466 # User has dragged outside of axes 467 self.selectedText = None 468 return 469 450 470 if self.enable_toolbar: 451 471 #Disable dragging without the toolbar to allow zooming with toolbar
Note: See TracChangeset
for help on using the changeset viewer.