Ignore:
Timestamp:
Jul 5, 2017 6:57:25 PM (4 years ago)
Author:
toby
Message:

fix menu binds to dataWindow; fix Help menu for non-mac; dataFrame removal done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIctrlGUI.py

    r2909 r2911  
    35113511        self.HelpById
    35123512
    3513         Note that self may be child of the main window (G2frame) or of the dataWindow
     3513        Note that self should now (2frame) be child of the main window (G2frame)
    35143514        '''
    3515         #TODO: !
    3516         if hasattr(self.frame,'dataFrame'):  # find the dataFrame
     3515        if hasattr(self.frame,'dataWindow'):  # Debug code: check this is called from menu in G2frame
     3516            # should always be true in 2 Frame version
    35173517            dW = self.frame.dataWindow
    35183518        else:
    35193519            print('help error: not called from standard menu?')
    35203520            print self
    3521             return
    3522            
     3521            return           
    35233522        try:
    3524             helpKey = dW.helpKey # BHT: look up help from helpKey in data window
    3525             #if GSASIIpath.GetConfigValue('debug'): print 'dataFrame help: key=',helpKey
     3523            helpKey = dW.helpKey # look up help from helpKey in data window
     3524            #if GSASIIpath.GetConfigValue('debug'): print 'dataWindow help: key=',helpKey
    35263525        except AttributeError:
    35273526            helpKey = ''
    3528             if GSASIIpath.GetConfigValue('debug'):
    3529                 print('No helpKey for current dataFrame!')
     3527            if GSASIIpath.GetConfigValue('debug'): print('No helpKey for current dataWindow!')
    35303528        helpType = self.HelpById.get(event.GetId(),helpKey) # see if there is a special help topic
    3531         if GSASIIpath.GetConfigValue('debug'):
    3532             print 'helpKey=',helpKey,'  helpType=',helpType
     3529        #if GSASIIpath.GetConfigValue('debug'): print 'helpKey=',helpKey,'  helpType=',helpType
    35333530        if helpType == 'Tutorials':
    35343531            dlg = OpenTutorial(self.frame)
Note: See TracChangeset for help on using the changeset viewer.