5 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
6 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
7 |
|
|
8 |
|
import sys |
9 |
|
|
10 |
from Thuban import _ |
from Thuban import _ |
11 |
|
|
12 |
from wxPython.wx import * |
from wxPython.wx import * |
88 |
psizer.Add(wxStaticText(self, -1, _("Generate:")), |
psizer.Add(wxStaticText(self, -1, _("Generate:")), |
89 |
0, wxALIGN_CENTER_VERTICAL, 0) |
0, wxALIGN_CENTER_VERTICAL, 0) |
90 |
|
|
91 |
self.genCombo = wxComboBox(self, |
self.genCombo = wxChoice(self, ID_CLASSGEN_GENCOMBO) |
|
ID_CLASSGEN_GENCOMBO, |
|
|
"", style = wxCB_READONLY) |
|
92 |
psizer.Add(self.genCombo, 1, wxALL | wxGROW, 4) |
psizer.Add(self.genCombo, 1, wxALL | wxGROW, 4) |
93 |
EVT_COMBOBOX(self, ID_CLASSGEN_GENCOMBO, self._OnGenTypeSelect) |
EVT_CHOICE(self, ID_CLASSGEN_GENCOMBO, self._OnGenTypeSelect) |
94 |
|
|
95 |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
96 |
|
|
118 |
psizer.Add(wxStaticText(self, -1, _("Color Scheme:")), |
psizer.Add(wxStaticText(self, -1, _("Color Scheme:")), |
119 |
0, wxALIGN_CENTER_VERTICAL, 0) |
0, wxALIGN_CENTER_VERTICAL, 0) |
120 |
|
|
121 |
self.propCombo = wxComboBox(self, |
self.propCombo = wxChoice(self, ID_CLASSGEN_PROPCOMBO) |
|
ID_CLASSGEN_PROPCOMBO, |
|
|
"", style = wxCB_READONLY) |
|
122 |
psizer.Add(self.propCombo, 1, wxALL | wxGROW, 4) |
psizer.Add(self.propCombo, 1, wxALL | wxGROW, 4) |
123 |
EVT_COMBOBOX(self, ID_CLASSGEN_PROPCOMBO, self._OnPropTypeSelect) |
EVT_CHOICE(self, ID_CLASSGEN_PROPCOMBO, self._OnPropTypeSelect) |
124 |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
125 |
|
|
126 |
############# |
############# |
310 |
self.numGroupsChanging = False |
self.numGroupsChanging = False |
311 |
self.steppingChanging = False |
self.steppingChanging = False |
312 |
|
|
313 |
self.numGroupsCtrl.SetRange(1, 100) |
self.numGroupsCtrl.SetRange(1, sys.maxint) |
314 |
|
|
315 |
self.numGroupsCtrl.SetValue(1) |
self.numGroupsCtrl.SetValue(1) |
316 |
self.stepCtrl.SetValue("1") |
self.stepCtrl.SetValue("1") |
360 |
self.numGroupsCtrl.Enable(on) |
self.numGroupsCtrl.Enable(on) |
361 |
self.stepCtrl.Enable(on) |
self.stepCtrl.Enable(on) |
362 |
|
|
|
if on: |
|
|
self.numGroupsCtrl.SetRange(1, abs(max - min) / 0.001) |
|
|
|
|
363 |
ngroups = self.GetNumGroups() |
ngroups = self.GetNumGroups() |
364 |
|
|
365 |
if ngroups is not None \ |
if ngroups is not None \ |
390 |
min = self.GetMin() |
min = self.GetMin() |
391 |
max = self.GetMax() |
max = self.GetMax() |
392 |
|
|
|
if ngroups >= self.numGroupsCtrl.GetMax(): |
|
|
self.numGroupsCtrl.SetRange(1, ngroups + 1) |
|
|
|
|
393 |
if ngroups is not None \ |
if ngroups is not None \ |
394 |
and min is not None \ |
and min is not None \ |
395 |
and max is not None \ |
and max is not None \ |