Ignore:
Timestamp:
Mar 20, 2019 10:06:22 AM (5 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
ticket-1249
Children:
9305b46
Parents:
09d7021
Message:

py3/wx4 compatibility changes for gui. Refs #1249

Location:
src/sas/sasgui/guiframe/local_perspectives/plotting
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py

    r5251ec6 r34f23c8  
    161161        new_plot.detector = self.base.data2D.detector 
    162162        # If the data file does not tell us what the axes are, just assume... 
    163         new_plot.xaxis("\\rm{\phi}", 'degrees') 
    164         new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 
    165         if hasattr(data, "scale") and data.scale == 'linear' and \ 
    166                 self.base.data2D.name.count("Residuals") > 0: 
     163        new_plot.xaxis(r"\rm{\phi}", 'degrees') 
     164        new_plot.yaxis(r"\rm{Intensity} ", "cm^{-1}") 
     165        if (hasattr(data, "scale") and data.scale == 'linear' 
     166                and self.base.data2D.name.count("Residuals") > 0): 
    167167            new_plot.ytransform = 'y' 
    168             new_plot.yaxis("\\rm{Residuals} ", "/") 
     168            new_plot.yaxis(r"\rm{Residuals} ", "/") 
    169169 
    170170        new_plot.group_id = "AnnulusPhi" + self.base.data2D.name 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    r5251ec6 r34f23c8  
    205205        self.canvas.set_resizing(self.resizing) 
    206206        self.parent.set_schedule(True) 
    207         pos_x, pos_y = self.GetPositionTuple() 
     207        pos_x, pos_y = self.GetPosition() 
    208208        if pos_x != 0 and pos_y != 0: 
    209             self.size, _ = self.GetClientSizeTuple() 
     209            self.size, _ = self.GetClientSize() 
    210210        self.SetSizer(self.sizer) 
    211211        wx.CallAfter(self.parent.disable_app_menu, self) 
     
    714714            pos = self.ScreenToClient(pos_evt) 
    715715        except: 
    716             pos_x, pos_y = self.toolbar.GetPositionTuple() 
     716            pos_x, pos_y = self.toolbar.GetPosition() 
    717717            pos = (pos_x, pos_y + 5) 
    718718        self.PopupMenu(self._slicerpop, pos) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py

    r5251ec6 r34f23c8  
    179179        # On Windows platform, default window size is incorrect, so set 
    180180        # toolbar width to figure width. 
    181         _, th = self.toolbar.GetSizeTuple() 
    182         fw, _ = self.canvas.GetSizeTuple() 
     181        _, th = self.toolbar.GetSize() 
     182        fw, _ = self.canvas.GetSize() 
    183183        self.toolbar.SetSize(wx.Size(fw, th)) 
    184184        self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) 
     
    400400            pos = self.ScreenToClient(pos_evt) 
    401401        except: 
    402             pos_x, pos_y = self.toolbar.GetPositionTuple() 
     402            pos_x, pos_y = self.toolbar.GetPosition() 
    403403            pos = (pos_x, pos_y + 5) 
    404404        self.PopupMenu(slicerpop, pos) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SimplePlot.py

    r7432acb r34f23c8  
    8484            pos = self.ScreenToClient(pos_evt) 
    8585        except: 
    86             pos_x, pos_y = self.toolbar.GetPositionTuple() 
     86            pos_x, pos_y = self.toolbar.GetPosition() 
    8787            pos = (pos_x, pos_y + 5) 
    8888        self.PopupMenu(slicerpop, pos) 
     
    135135        # set the resizing flag 
    136136        self.canvas.set_resizing(self.resizing) 
    137         pos_x, pos_y = self.GetPositionTuple() 
     137        pos_x, pos_y = self.GetPosition() 
    138138        if pos_x != 0 and pos_y != 0: 
    139             self.size, _ = self.GetClientSizeTuple() 
     139            self.size, _ = self.GetClientSize() 
    140140        self.SetSizer(self.sizer) 
    141141 
Note: See TracChangeset for help on using the changeset viewer.