Skip to content

Commit f483f81

Browse files
committed
remove unused dialog (CopyDialog); make notes about moving/improving another
1 parent 9874355 commit f483f81

File tree

1 file changed

+8
-54
lines changed

1 file changed

+8
-54
lines changed

GSASII/GSASIIdataGUI.py

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,61 +3306,15 @@ def CheckNotebook(self):
33063306
if new:
33073307
self.GPXtree.Expand(self.GPXtree.root)
33083308

3309-
class CopyDialog(wx.Dialog):
3310-
'''Creates a dialog for copying control settings between
3311-
data tree items'''
3312-
def __init__(self,parent,title,text,data):
3313-
wx.Dialog.__init__(self,parent,-1,title,
3314-
pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE)
3315-
self.data = data
3316-
panel = wx.Panel(self)
3317-
mainSizer = wx.BoxSizer(wx.VERTICAL)
3318-
topLabl = wx.StaticText(panel,-1,text)
3319-
mainSizer.Add((10,10),1)
3320-
mainSizer.Add(topLabl,0,wx.ALIGN_CENTER_VERTICAL|wx.LEFT,10)
3321-
mainSizer.Add((10,10),1)
3322-
ncols = len(data)/40+1
3323-
dataGridSizer = wx.FlexGridSizer(cols=ncols,hgap=2,vgap=2)
3324-
for Id,item in enumerate(self.data):
3325-
ckbox = wx.CheckBox(panel,Id,item[1])
3326-
ckbox.Bind(wx.EVT_CHECKBOX,self.OnCopyChange)
3327-
dataGridSizer.Add(ckbox,0,wx.LEFT,10)
3328-
mainSizer.Add(dataGridSizer,0,wx.EXPAND)
3329-
OkBtn = wx.Button(panel,-1,"Ok")
3330-
OkBtn.Bind(wx.EVT_BUTTON, self.OnOk)
3331-
cancelBtn = wx.Button(panel,-1,"Cancel")
3332-
cancelBtn.Bind(wx.EVT_BUTTON, self.OnCancel)
3333-
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
3334-
btnSizer.Add((20,20),1)
3335-
btnSizer.Add(OkBtn)
3336-
btnSizer.Add((20,20),1)
3337-
btnSizer.Add(cancelBtn)
3338-
btnSizer.Add((20,20),1)
3339-
3340-
mainSizer.Add(btnSizer,0,wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
3341-
panel.SetSizer(mainSizer)
3342-
panel.Fit()
3343-
self.Fit()
3344-
3345-
def OnCopyChange(self,event):
3346-
Id = event.GetId()
3347-
self.data[Id][0] = self.FindWindowById(Id).GetValue()
3348-
3349-
def OnOk(self,event):
3350-
parent = self.GetParent()
3351-
if parent is not None: parent.Raise()
3352-
self.EndModal(wx.ID_OK)
3353-
3354-
def OnCancel(self,event):
3355-
parent = self.GetParent()
3356-
if parent is not None: parent.Raise()
3357-
self.EndModal(wx.ID_CANCEL)
3358-
3359-
def GetData(self):
3360-
return self.data
3361-
33623309
class SumDialog(wx.Dialog):
3363-
'''Allows user to supply scale factor(s) when summing data
3310+
'''Used to sum images or powder patterns. Allows user to supply
3311+
scale factor(s) when summing data.
3312+
3313+
TODO: clean up the scrolling & resize on this dialog
3314+
Can we use the copy down button from CIF?
3315+
TODO: move it to GSASIIctrlGUI?
3316+
BHT: this class should not be in the middle of the (already too complex)
3317+
GSASIImain class.
33643318
'''
33653319
def __init__(self,parent,title,text,dataType,data,dataList,Limits=None):
33663320
wx.Dialog.__init__(self,parent,-1,title,size=(400,250),

0 commit comments

Comments
 (0)