Ignore:
Timestamp:
Mar 30, 2021 7:54:44 PM (8 months ago)
Author:
toby
Message:

.Raise() is causing crashes, use only on wx.Dialog or wx.Frame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4860 r4869  
    280280    def OnOk(self,event):
    281281        parent = self.GetParent()
    282         parent.Raise()
     282        if parent is not None: parent.Raise()
    283283        self.EndModal(wx.ID_OK)
    284284
    285285    def OnCancel(self,event):
    286286        parent = self.GetParent()
    287         parent.Raise()
     287        if parent is not None: parent.Raise()
    288288        self.EndModal(wx.ID_CANCEL)
    289289       
     
    35123512        def OnOk(self,event):
    35133513            parent = self.GetParent()
    3514             parent.Raise()
     3514            if parent is not None: parent.Raise()
    35153515            self.EndModal(wx.ID_OK)             
    35163516           
    35173517        def OnCancel(self,event):
    35183518            parent = self.GetParent()
    3519             parent.Raise()
     3519            if parent is not None: parent.Raise()
    35203520            self.EndModal(wx.ID_CANCEL)             
    35213521           
     
    37393739                if not self.OnTest(event): return
    37403740            parent = self.GetParent()
    3741             parent.Raise()
     3741            if parent is not None: parent.Raise()
    37423742            self.EndModal(wx.ID_OK)             
    37433743           
    37443744        def OnCancel(self,event):
    37453745            parent = self.GetParent()
    3746             parent.Raise()
     3746            if parent is not None: parent.Raise()
    37473747            self.EndModal(wx.ID_CANCEL)             
    37483748           
     
    51905190            dlg.SetSize((int(Size[0]*1.2),Size[1])) # increase size a bit along x
    51915191        dlg.CenterOnParent()
    5192         dlg.Raise()
     5192        #dlg.Raise()  # dangerous, crashes on some platforms
    51935193        Rw = 100.00
    51945194        self.SaveTreeSetting() # save the current tree selection
     
    52725272            dlg.SetSize((int(Size[0]*1.2),Size[1])) # increase size a bit along x
    52735273        dlg.CenterOnParent()
    5274         dlg.Raise()
     5274        #dlg.Raise() # dangerous
    52755275        self.SaveTreeSetting() # save the current tree selection
    52765276        self.GPXtree.SaveExposedItems()             # save the exposed/hidden tree items
     
    55155515        if parent is None:
    55165516            dlg = wx.MessageDialog(self, message, title,  wtype)
    5517             dlg.Raise()
    55185517        else:
    55195518            dlg = wx.MessageDialog(parent, message, title,  wtype)
Note: See TracChangeset for help on using the changeset viewer.