Changeset 4577


Ignore:
Timestamp:
Sep 24, 2020 5:21:47 PM (15 months ago)
Author:
vondreele
Message:

A much better fix to the C++ bug. Happens in Windows when gpx file opened directly or dropped om the G2 icon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r4576 r4577  
    12421242        used (see RaisePage), or to refresh the current tab contents (event=None)
    12431243        '''
    1244         if event is None: return
    12451244        if event:       #page change event!
    12461245            page = event.GetSelection()
    12471246        else: # called directly, get current page
    1248             page = G2frame.constr.GetSelection()
     1247            try:
     1248                page = G2frame.constr.GetSelection()
     1249            except:
     1250                if GSASIIpath.GetConfigValue('debug'): print('DBG_gpx open error:C++ Run time error - skipped')
     1251                return
    12491252        G2frame.constr.ChangeSelection(page)
    12501253        text = G2frame.constr.GetPageText(page)
     
    17751778        global resList
    17761779        resList = []
    1777         if event is None: return
    17781780        if event:       #page change event!
    17791781            page = event.GetSelection()
    17801782        else:
    1781             page = G2frame.rbBook.GetSelection()
     1783            try:
     1784                page = G2frame.rbBook.GetSelection()
     1785            except:
     1786                if GSASIIpath.GetConfigValue('debug'): print('DBG_gpx open error:C++ Run time error - skipped')
     1787                return
    17821788        G2frame.rbBook.ChangeSelection(page)
    17831789        text = G2frame.rbBook.GetPageText(page)
Note: See TracChangeset for help on using the changeset viewer.