Changeset 4369


Ignore:
Timestamp:
Mar 14, 2020 4:46:45 AM (19 months ago)
Author:
vondreele
Message:

new menu item in main menu Data/Delete? plots - allows deleting selected plots from plot window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4360 r4369  
    509509        item = parent.Append(wx.ID_ANY,'Delete tree items','Delete selected data items from data tree')
    510510        self.Bind(wx.EVT_MENU, self.OnDataDelete, id=item.GetId())
     511        item = parent.Append(wx.ID_ANY,'Delete plots','Delete selected plots')
     512        self.Bind(wx.EVT_MENU, self.OnPlotDelete, id=item.GetId())
    511513        expandmenu = wx.Menu()
    512514        item = parent.AppendSubMenu(expandmenu,'Expand tree items', 
     
    38683870            finally:
    38693871                dlg.Destroy()
     3872               
     3873    def OnPlotDelete(self,event):
     3874        '''Delete one or more plots from plot window. Called by the
     3875        Data/DeletePlots menu
     3876        '''
     3877        plotNames = self.G2plotNB.plotList
     3878        if len(plotNames):
     3879            dlg = G2G.G2MultiChoiceDialog(self, 'Which plots to delete?', 'Delete plots', plotNames, wx.CHOICEDLG_STYLE)
     3880            try:
     3881                if dlg.ShowModal() == wx.ID_OK:
     3882                    result = dlg.GetSelections()
     3883                    result.sort(reverse=True)
     3884                    for i in result:
     3885                        self.G2plotNB.Delete(plotNames[i])
     3886            finally:
     3887                dlg.Destroy()
    38703888
    38713889    def OnFileReopen(self, event):
     
    64176435        G2plt.PlotSelectedSequence(G2frame,cols,GetColumnInfo,SelectXaxis)
    64186436           
    6419 #    def OnReOrgSelSeq(event):
    6420 #        'Reorder the columns -- probably not fully implemented'
    6421 #        G2G.GetItemOrder(G2frame,VaryListChanges,vallookup,posdict)   
    6422 #        UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables
    6423 
    64246437    def OnSaveSelSeqCSV(event):
    64256438        'export the selected columns to a .csv file from menu command'
Note: See TracChangeset for help on using the changeset viewer.