Changeset 6f16e25 in sasview for src/sas/guiframe/local_perspectives/plotting/Plotter2D.py
- Timestamp:
- Oct 21, 2015 8:35:00 AM (9 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:
- 85130cb
- Parents:
- 2d88fc4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/guiframe/local_perspectives/plotting/Plotter2D.py
r2d88fc4 r6f16e25 287 287 288 288 """ 289 self._menu_ids.reset()289 ids = iter(self._menu_ids) 290 290 slicerpop = PanelMenu() 291 291 slicerpop.set_plots(self.plots) 292 292 slicerpop.set_graph(self.graph) 293 293 294 wx_id = self._menu_ids.next()294 wx_id = ids.next() 295 295 slicerpop.Append(wx_id, '&Save Image') 296 296 wx.EVT_MENU(self, wx_id, self.onSaveImage) 297 297 298 wx_id = self._menu_ids.next()298 wx_id = ids.next() 299 299 slicerpop.Append(wx_id, '&Print Image', 'Print image') 300 300 wx.EVT_MENU(self, wx_id, self.onPrint) 301 301 302 wx_id = self._menu_ids.next()302 wx_id = ids.next() 303 303 slicerpop.Append(wx_id, '&Copy to Clipboard', 'Copy to the clipboard') 304 304 wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu) … … 306 306 # saving data 307 307 plot = self.data2D 308 wx_id = self._menu_ids.next()308 wx_id = ids.next() 309 309 slicerpop.Append(wx_id, "&Data Info") 310 310 wx.EVT_MENU(self, wx_id, self._onDataShow) 311 311 312 wx_id = self._menu_ids.next()312 wx_id = ids.next() 313 313 slicerpop.Append(wx_id, "&Save as a File (DAT)") 314 314 self.action_ids[str(wx_id)] = plot … … 321 321 self.data2D.name.split(" ")[0] != 'Residuals': 322 322 # The line above; Not for trunk 323 for item in item_list: 323 # Note: reusing menu ids for the sub-menus. See Plotter1D. 324 for item, wx_id in zip(item_list, self._menu_ids): 324 325 try: 325 wx_id = self._menu_ids.next()326 326 slicerpop.Append(wx_id, item[0], item[1]) 327 327 wx.EVT_MENU(self, wx_id, item[2]) … … 332 332 slicerpop.AppendSeparator() 333 333 334 wx_id = self._menu_ids.next()334 wx_id = ids.next() 335 335 slicerpop.Append(wx_id, '&Perform Circular Average') 336 336 wx.EVT_MENU(self, wx_id, self.onCircular) \ 337 337 # For Masked Data 338 338 if not plot.mask.all(): 339 wx_id = self._menu_ids.next()339 wx_id = ids.next() 340 340 slicerpop.Append(wx_id, '&Masked Circular Average') 341 341 wx.EVT_MENU(self, wx_id, self.onMaskedCircular) 342 wx_id = self._menu_ids.next()342 wx_id = ids.next() 343 343 slicerpop.Append(wx_id, '&Sector [Q View]') 344 344 wx.EVT_MENU(self, wx_id, self.onSectorQ) 345 wx_id = self._menu_ids.next()345 wx_id = ids.next() 346 346 slicerpop.Append(wx_id, '&Annulus [Phi View ]') 347 347 wx.EVT_MENU(self, wx_id, self.onSectorPhi) 348 wx_id = self._menu_ids.next()348 wx_id = ids.next() 349 349 slicerpop.Append(wx_id, '&Box Sum') 350 350 wx.EVT_MENU(self, wx_id, self.onBoxSum) 351 wx_id = self._menu_ids.next()351 wx_id = ids.next() 352 352 slicerpop.Append(wx_id, '&Box Averaging in Qx') 353 353 wx.EVT_MENU(self, wx_id, self.onBoxavgX) 354 wx_id = self._menu_ids.next()354 wx_id = ids.next() 355 355 slicerpop.Append(wx_id, '&Box Averaging in Qy') 356 356 wx.EVT_MENU(self, wx_id, self.onBoxavgY) 357 357 if self.slicer != None: 358 wx_id = self._menu_ids.next()358 wx_id = ids.next() 359 359 slicerpop.Append(wx_id, '&Clear Slicer') 360 360 wx.EVT_MENU(self, wx_id, self.onClearSlicer) 361 361 if self.slicer.__class__.__name__ != "BoxSum": 362 wx_id = self._menu_ids.next()362 wx_id = ids.next() 363 363 slicerpop.Append(wx_id, '&Edit Slicer Parameters') 364 364 wx.EVT_MENU(self, wx_id, self._onEditSlicer) 365 365 slicerpop.AppendSeparator() 366 366 367 wx_id = self._menu_ids.next()367 wx_id = ids.next() 368 368 slicerpop.Append(wx_id, '&Edit Graph Label', 'Edit Graph Label') 369 369 wx.EVT_MENU(self, wx_id, self.onEditLabels) … … 372 372 # ILL mod here 373 373 374 wx_id = self._menu_ids.next()374 wx_id = ids.next() 375 375 slicerpop.Append(wx_id, '&Modify graph appearance', 'Modify graph appearance') 376 376 wx.EVT_MENU(self, wx_id, self.modifyGraphAppearance) 377 377 slicerpop.AppendSeparator() 378 378 379 wx_id = self._menu_ids.next()379 wx_id = ids.next() 380 380 slicerpop.Append(wx_id, '&2D Color Map') 381 381 wx.EVT_MENU(self, wx_id, self._onEditDetector) 382 382 slicerpop.AppendSeparator() 383 383 384 wx_id = self._menu_ids.next()384 wx_id = ids.next() 385 385 slicerpop.Append(wx_id, '&Toggle Linear/Log Scale') 386 386 wx.EVT_MENU(self, wx_id, self._onToggleScale) 387 387 388 388 slicerpop.AppendSeparator() 389 wx_id = self._menu_ids.next()389 wx_id = ids.next() 390 390 slicerpop.Append(wx_id, '&Window Title') 391 391 wx.EVT_MENU(self, wx_id, self.onChangeCaption)
Note: See TracChangeset
for help on using the changeset viewer.