Ignore:
Timestamp:
Jan 1, 2022 3:00:59 PM (15 months ago)
Author:
toby
Message:

start on fullrmc mods; wx4.1 fix; address wx.Point with float args warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElemGUI.py

    r4660 r5122  
    2020import os
    2121import wx.lib.colourselect as wscs
     22# for Python 3.10+, define a version of wxPoint that accepts float params
     23def wxPoint(x,y): return wx.Point(int(x),int(y))
    2224class PickElement(wx.Dialog):
    2325    '''Makes periodic table widget for picking element. Modes:
     
    4951                color=E[6]
    5052            self.ElButton(name=E[0],
    51                pos=wx.Point(E[1]*self.butWid+25,E[2]*24+24),
     53               pos=wxPoint(E[1]*self.butWid+25,E[2]*24+24),
    5254               tip=E[3],color=color)
    5355            i+=1
    5456        if self.multiple:
    5557            b = wx.Button(self,wx.ID_CLOSE,
    56                 pos=wx.Point(16.5*self.butWid+25,7.75*24+24),label="Done")
     58                pos=wxPoint(16.5*self.butWid+25,7.75*24+24),label="Done")
    5759            b.Bind(wx.EVT_BUTTON, self.OnClose)
    5860
     
    246248        for E in self.ElTable:
    247249            PickElements.ElButton(self,parent=elPanel,name=E[0],
    248                 pos=wx.Point(E[1]*30+20,E[2]*30+25),tip=E[3],color=E[4])
     250                pos=wxPoint(E[1]*30+20,E[2]*30+25),tip=E[3],color=E[4])
    249251            i+=1
    250252        mainSizer.Add(elPanel,0,wx.EXPAND)
     
    321323        Elem = []
    322324        for Elem in choice:
    323             self.ElButton(name=Elem,pos=wx.Point(16+i*24, 16))
     325            self.ElButton(name=Elem,pos=wxPoint(16+i*24, 16))
    324326            i+=1
    325327             
Note: See TracChangeset for help on using the changeset viewer.