Ignore:
Timestamp:
Aug 12, 2016 6:40:40 AM (8 years ago)
Author:
lewis
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1925a8e
Parents:
2c627ad (diff), 2cff9db (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.
Message:

Merge branch 'master' into corfunc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    r5a54aa4 ra47d0c8  
    580580        self._slicerpop.set_graph(self.graph) 
    581581        ids = iter(self._menu_ids) 
    582         if not self.graph.selected_plottable in self.plots: 
    583             # Various plot options 
    584             wx_id = ids.next() 
    585             self._slicerpop.Append(wx_id, '&Save Image', 'Save image as PNG') 
    586             wx.EVT_MENU(self, wx_id, self.onSaveImage) 
    587             wx_id = ids.next() 
    588             self._slicerpop.Append(wx_id, '&Print Image', 'Print image ') 
    589             wx.EVT_MENU(self, wx_id, self.onPrint) 
    590  
    591             wx_id = ids.next() 
    592             self._slicerpop.Append(wx_id, '&Copy to Clipboard', 
    593                                    'Copy to the clipboard') 
    594             wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu) 
    595  
    596             self._slicerpop.AppendSeparator() 
     582 
     583        # Various plot options 
     584        wx_id = ids.next() 
     585        self._slicerpop.Append(wx_id, '&Save Image', 'Save image as PNG') 
     586        wx.EVT_MENU(self, wx_id, self.onSaveImage) 
     587        wx_id = ids.next() 
     588        self._slicerpop.Append(wx_id, '&Print Image', 'Print image ') 
     589        wx.EVT_MENU(self, wx_id, self.onPrint) 
     590 
     591        wx_id = ids.next() 
     592        self._slicerpop.Append(wx_id, '&Copy to Clipboard', 
     593                               'Copy to the clipboard') 
     594        wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu) 
     595 
     596        self._slicerpop.AppendSeparator() 
    597597 
    598598        for plot in self.plots.values(): 
     
    617617            item_list = self.parent.get_current_context_menu(self) 
    618618            if (not item_list == None) and (not len(item_list) == 0): 
    619                 # Note: reusing menu ids in submenu.  This code works because 
    620                 # IdItems is set up as a lazy iterator returning each id in 
    621                 # sequence, creating new ids as needed so it never runs out. 
    622                 # zip() is set up to stop when any iterator is empty, so it 
    623                 # only asks for the number of ids in item_list. 
    624                 for item, wx_id in zip(item_list, self._menu_ids): 
     619                for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 
    625620 
    626621                    try: 
     
    671666            # Option to hide 
    672667            # TODO: implement functionality to hide a plottable (legend click) 
    673         if not self.graph.selected_plottable in self.plots: 
     668 
     669        self._slicerpop.AppendSeparator() 
     670        loc_menu = wx.Menu() 
     671        for label in self._loc_labels: 
     672            wx_id = ids.next() 
     673            loc_menu.Append(wx_id, str(label), str(label)) 
     674            wx.EVT_MENU(self, wx_id, self.onChangeLegendLoc) 
     675 
     676        wx_id = ids.next() 
     677        self._slicerpop.Append(wx_id, '&Modify Graph Appearance', 
     678                               'Modify graph appearance') 
     679        wx.EVT_MENU(self, wx_id, self.modifyGraphAppearance) 
     680        self._slicerpop.AppendSeparator() 
     681 
     682 
     683        if self.position != None: 
     684            wx_id = ids.next() 
     685            self._slicerpop.Append(wx_id, '&Add Text') 
     686            wx.EVT_MENU(self, wx_id, self._on_addtext) 
     687            wx_id = ids.next() 
     688            self._slicerpop.Append(wx_id, '&Remove Text') 
     689            wx.EVT_MENU(self, wx_id, self._on_removetext) 
    674690            self._slicerpop.AppendSeparator() 
    675             loc_menu = wx.Menu() 
    676             for label in self._loc_labels: 
    677                 wx_id = ids.next() 
    678                 loc_menu.Append(wx_id, str(label), str(label)) 
    679                 wx.EVT_MENU(self, wx_id, self.onChangeLegendLoc) 
    680  
    681             wx_id = ids.next() 
    682             self._slicerpop.Append(wx_id, '&Modify Graph Appearance', 
    683                                    'Modify graph appearance') 
    684             wx.EVT_MENU(self, wx_id, self.modifyGraphAppearance) 
    685             self._slicerpop.AppendSeparator() 
    686  
    687  
    688             if self.position != None: 
    689                 wx_id = ids.next() 
    690                 self._slicerpop.Append(wx_id, '&Add Text') 
    691                 wx.EVT_MENU(self, wx_id, self._on_addtext) 
    692                 wx_id = ids.next() 
    693                 self._slicerpop.Append(wx_id, '&Remove Text') 
    694                 wx.EVT_MENU(self, wx_id, self._on_removetext) 
    695                 self._slicerpop.AppendSeparator() 
    696             wx_id = ids.next() 
    697             self._slicerpop.Append(wx_id, '&Change Scale') 
    698             wx.EVT_MENU(self, wx_id, self._onProperties) 
     691        wx_id = ids.next() 
     692        self._slicerpop.Append(wx_id, '&Change Scale') 
     693        wx.EVT_MENU(self, wx_id, self._onProperties) 
     694        self._slicerpop.AppendSeparator() 
     695        wx_id = ids.next() 
     696        self._slicerpop.Append(wx_id, '&Reset Graph Range') 
     697        wx.EVT_MENU(self, wx_id, self.onResetGraph) 
     698 
     699        if self.parent.ClassName.count('wxDialog') == 0: 
    699700            self._slicerpop.AppendSeparator() 
    700701            wx_id = ids.next() 
    701             self._slicerpop.Append(wx_id, '&Reset Graph Range') 
    702             wx.EVT_MENU(self, wx_id, self.onResetGraph) 
    703  
    704             if self.parent.ClassName.count('wxDialog') == 0: 
    705                 self._slicerpop.AppendSeparator() 
    706                 wx_id = ids.next() 
    707                 self._slicerpop.Append(wx_id, '&Window Title') 
    708                 wx.EVT_MENU(self, wx_id, self.onChangeCaption) 
     702            self._slicerpop.Append(wx_id, '&Window Title') 
     703            wx.EVT_MENU(self, wx_id, self.onChangeCaption) 
    709704        try: 
    710705            pos_evt = event.GetPosition() 
Note: See TracChangeset for help on using the changeset viewer.