Changeset 2366


Ignore:
Timestamp:
Jul 6, 2016 12:04:42 PM (5 years ago)
Author:
vondreele
Message:

Add a bit of instruction for deleting excluded regions
fix another plot behavior problem; use plotDebug to debug plot change issues

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2355 r2366  
    6868nxs = np.newaxis
    6969#    GSASIIpath.IPyBreak()
     70plotDebug = False
    7071   
    7172class _tabPlotWin(wx.Panel):   
     
    240241    def RaisePageNoRefresh(self,Page):
    241242        'Raises a plot tab without triggering a refresh via OnPageChanged'
    242 #        print 'Raise',str(self).split('0x')[1]
     243        if plotDebug: print 'Raise',str(self).split('0x')[1]
    243244        self.skipPageChange = True
    244245        Page.SetFocus()
     
    247248    def SetSelectionNoRefresh(self,plotNum):
    248249        'Raises a plot tab without triggering a refresh via OnPageChanged'
    249 #        print 'Select',str(self).split('0x')[1]
     250        if plotDebug: print 'Select',str(self).split('0x')[1]
    250251        self.skipPageChange = True
    251252        self.nb.SetSelection(plotNum) # raises plot tab
     
    262263        '''
    263264        tabLabel = event.GetEventObject().GetPageText(event.GetSelection())
    264 #        print 'PageChanged, self=',str(self).split('0x')[1],tabLabel,self.skipPageChange
    265 #        print 'event type=',event.GetEventType()
     265        if plotDebug:
     266            print 'PageChanged, self=',str(self).split('0x')[1],tabLabel,self.skipPageChange
     267            print 'event type=',event.GetEventType()
    266268        self.status.DestroyChildren()    #get rid of special stuff on status bar
    267269        self.status.SetFields(['',''])  # clear old status message
     
    292294        if pid: self.G2frame.PatternTree.SelectItem(pid)
    293295        self.allowZoomReset = True
    294 #        print 'invoke',str(self).split('0x')[1],str(pid)
     296        if plotDebug: print 'invoke',str(self).split('0x')[1],str(pid)
    295297           
    296298class GSASIItoolbar(Toolbar):
     
    24902492        Page.Choice = None
    24912493    G2frame.G2plotNB.RaisePageNoRefresh(Page)
     2494    G2frame.G2plotNB.skipPageChange = True     
    24922495    G2frame.G2plotNB.status.DestroyChildren()
    24932496    Plot.set_title(Title)
     
    30473050        Page = G2frame.G2plotNB.nb.GetPage(plotNum)
    30483051    Page.Choice = None
     3052    G2frame.G2plotNB.RaisePageNoRefresh(Page)
     3053    G2frame.G2plotNB.skipPageChange = True
    30493054    G2frame.G2plotNB.status.SetStatusText('',1)
    30503055   
     
    42344239            Page.figure.clf()
    42354240            Plot = Page.figure.gca()          #get a fresh plot after clf()
    4236 #        if not event:                       #event from GUI TextCtrl - don't want focus to change to plot!!!
    4237 #            G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab
    42384241    except ValueError:
    42394242        Plot = G2frame.G2plotNB.addMpl('2D Powder Image').gca()
     
    56515654        Draw('size')
    56525655       
    5653     def OnFocus(event):         #not needed?? Bind commented out below
     5656    def OnFocus(event):
    56545657        Draw('focus')
    56555658       
  • trunk/GSASIIpwdGUI.py

    r2365 r2366  
    12201220       
    12211221    def KeyEditPeakGrid(event):
     1222        '''for deleting excluded regions
     1223        '''
    12221224        if event.GetKeyCode() == wx.WXK_DELETE:
    12231225            row = G2frame.dataDisplay.GetSelectedRows()[0]
     
    12801282    if not G2frame.dataFrame.GetStatusBar():
    12811283        Status = G2frame.dataFrame.CreateStatusBar()
     1284    if len(data)>2:
     1285        Status.SetStatusText('To delete excluded region: select & press Delete key')
    12821286    G2frame.Bind(wx.EVT_MENU,OnLimitCopy,id=G2gd.wxID_LIMITCOPY)
    12831287    G2frame.Bind(wx.EVT_MENU,OnAddExcl,id=G2gd.wxID_ADDEXCLREGION)   
Note: See TracChangeset for help on using the changeset viewer.