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:
Roman Rolinsky
2003-01-30 18:44:28 +00:00
parent 5b8c58c590
commit 5b4532b24b
2 changed files with 7 additions and 4 deletions

View File

@@ -161,6 +161,7 @@ class ParamPage(wxPanel):
xxx = self.xxx
param = evt.GetEventObject().GetName()
w = self.controls[param]
w.Enable(true)
objElem = xxx.element
if evt.IsChecked():
# Ad new text node in order of allParams
@@ -193,7 +194,7 @@ class ParamPage(wxPanel):
del xxx.params[param]
w.SetValue('')
w.modified = false # mark as not changed
w.Enable(evt.IsChecked())
w.Enable(false)
# Set modified flag (provokes undo storing is necessary)
panel.SetModified(true)
def Apply(self):

View File

@@ -711,19 +711,21 @@ class ParamBitmap(PPanel):
EVT_TEXT(self, XMLID('TEXT_FILE'), self.OnChange)
def OnRadioStd(self, evt):
self.SetModified()
self.SetValue('')
self.SetValue(['wxART_MISSING_IMAGE',''])
def OnRadioFile(self, evt):
self.SetModified()
self.SetValue(['',''])
def updateRadios(self):
if self.value[0]:
self.radio_std.SetValue(true)
self.text.Enable(false)
self.button.Enable(false)
self.combo.Enable(true)
else:
self.radio_file.SetValue(true)
self.text.Enable(true)
self.button.Enable(true)
self.combo.Enable(false)
self.combo.Enable(false)
def OnChange(self, evt):
PPanel.OnChange(self, evt)
self.textModified = true
@@ -737,7 +739,7 @@ class ParamBitmap(PPanel):
def SetValue(self, value):
self.freeze = true
if not value:
self.value = ['wxART_MISSING_IMAGE', '']
self.value = ['', '']
else:
self.value = value
self.combo.SetValue(self.value[0])