fixed a problem with default selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -161,6 +161,7 @@ class ParamPage(wxPanel):
|
|||||||
xxx = self.xxx
|
xxx = self.xxx
|
||||||
param = evt.GetEventObject().GetName()
|
param = evt.GetEventObject().GetName()
|
||||||
w = self.controls[param]
|
w = self.controls[param]
|
||||||
|
w.Enable(true)
|
||||||
objElem = xxx.element
|
objElem = xxx.element
|
||||||
if evt.IsChecked():
|
if evt.IsChecked():
|
||||||
# Ad new text node in order of allParams
|
# Ad new text node in order of allParams
|
||||||
@@ -193,7 +194,7 @@ class ParamPage(wxPanel):
|
|||||||
del xxx.params[param]
|
del xxx.params[param]
|
||||||
w.SetValue('')
|
w.SetValue('')
|
||||||
w.modified = false # mark as not changed
|
w.modified = false # mark as not changed
|
||||||
w.Enable(evt.IsChecked())
|
w.Enable(false)
|
||||||
# Set modified flag (provokes undo storing is necessary)
|
# Set modified flag (provokes undo storing is necessary)
|
||||||
panel.SetModified(true)
|
panel.SetModified(true)
|
||||||
def Apply(self):
|
def Apply(self):
|
||||||
|
@@ -711,16 +711,18 @@ class ParamBitmap(PPanel):
|
|||||||
EVT_TEXT(self, XMLID('TEXT_FILE'), self.OnChange)
|
EVT_TEXT(self, XMLID('TEXT_FILE'), self.OnChange)
|
||||||
def OnRadioStd(self, evt):
|
def OnRadioStd(self, evt):
|
||||||
self.SetModified()
|
self.SetModified()
|
||||||
self.SetValue('')
|
self.SetValue(['wxART_MISSING_IMAGE',''])
|
||||||
def OnRadioFile(self, evt):
|
def OnRadioFile(self, evt):
|
||||||
self.SetModified()
|
self.SetModified()
|
||||||
self.SetValue(['',''])
|
self.SetValue(['',''])
|
||||||
def updateRadios(self):
|
def updateRadios(self):
|
||||||
if self.value[0]:
|
if self.value[0]:
|
||||||
|
self.radio_std.SetValue(true)
|
||||||
self.text.Enable(false)
|
self.text.Enable(false)
|
||||||
self.button.Enable(false)
|
self.button.Enable(false)
|
||||||
self.combo.Enable(true)
|
self.combo.Enable(true)
|
||||||
else:
|
else:
|
||||||
|
self.radio_file.SetValue(true)
|
||||||
self.text.Enable(true)
|
self.text.Enable(true)
|
||||||
self.button.Enable(true)
|
self.button.Enable(true)
|
||||||
self.combo.Enable(false)
|
self.combo.Enable(false)
|
||||||
@@ -737,7 +739,7 @@ class ParamBitmap(PPanel):
|
|||||||
def SetValue(self, value):
|
def SetValue(self, value):
|
||||||
self.freeze = true
|
self.freeze = true
|
||||||
if not value:
|
if not value:
|
||||||
self.value = ['wxART_MISSING_IMAGE', '']
|
self.value = ['', '']
|
||||||
else:
|
else:
|
||||||
self.value = value
|
self.value = value
|
||||||
self.combo.SetValue(self.value[0])
|
self.combo.SetValue(self.value[0])
|
||||||
|
Reference in New Issue
Block a user