774 |
|
|
775 |
self.fieldTypeText.SetLabel(_("Field Type: %s") % text) |
self.fieldTypeText.SetLabel(_("Field Type: %s") % text) |
776 |
|
|
777 |
def __SelectField(self, fieldIndex): |
def __SelectField(self, newIndex, oldIndex = -1): |
|
clazz = self.__BuildClassification(fieldIndex) |
|
|
self.fields.SetClientData(fieldIndex, clazz) |
|
778 |
|
|
779 |
self.__cur_field = self.fields.GetSelection() |
assert(oldIndex >= -1) |
|
self.__SetGridTable(fieldIndex) |
|
780 |
|
|
781 |
enabled = fieldIndex != 0 |
if oldIndex != -1: |
782 |
|
clazz = self.__BuildClassification(oldIndex) |
783 |
|
self.fields.SetClientData(oldIndex, clazz) |
784 |
|
|
785 |
|
self.__SetGridTable(newIndex) |
786 |
|
|
787 |
|
enabled = newIndex != 0 |
788 |
|
|
789 |
for b in self.controlButtons: |
for b in self.controlButtons: |
790 |
b.Enable(enabled) |
b.Enable(enabled) |
791 |
|
|
792 |
self.__SetFieldTypeText(fieldIndex) |
self.__SetFieldTypeText(newIndex) |
793 |
|
|
794 |
|
|
795 |
def _OnFieldSelect(self, event): |
def _OnFieldSelect(self, event): |
796 |
self.__SelectField(self.__cur_field) |
index = self.fields.GetSelection() |
797 |
|
self.__SelectField(index, self.__cur_field) |
798 |
|
self.__cur_field = index |
799 |
|
|
800 |
def _OnApply(self, event): |
def _OnApply(self, event): |
801 |
"""Put the data from the table into a new Classification and hand |
"""Put the data from the table into a new Classification and hand |