1 |
|
2003-06-13 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
This puts back a fix for Windows where a panel is needed so that |
4 |
|
the background of the table view appears correctly. |
5 |
|
|
6 |
|
* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel |
7 |
|
object that can be used by derived classes to place any |
8 |
|
controls (including the grid) onto. |
9 |
|
(QueryTableFrame.__init__): Use the panel as the parent window |
10 |
|
for all the controls. Reparent the grid so that the panel is |
11 |
|
the parent. Call UpdateStatusText() to correctly initialize |
12 |
|
the status bar. |
13 |
|
|
14 |
|
2003-06-13 Jonathan Coles <[email protected]> |
15 |
|
|
16 |
|
* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits |
17 |
|
from wxFrame (as opposed to wxDialog like the other classes) |
18 |
|
but otherwise behaves like the other classes. This is needed |
19 |
|
for the TableView which isn't really a dialog and needs to |
20 |
|
have a status bar and control buttons. |
21 |
|
|
22 |
|
* Thuban/UI/tableview.py (TableGrid.__init__): Create an |
23 |
|
instance variable to keep track of how many rows are selected. |
24 |
|
Subscribe once to the the events we are interested in. |
25 |
|
(ThubanGrid.OnRangeSelect): Only handle event if event handling |
26 |
|
hasn't been turned off. |
27 |
|
(ThubanGrid.OnSelectCell): Only handle event if event handling |
28 |
|
hasn't been turned off. |
29 |
|
(ThubanGrid.ToggleEventListeners): Rather than subscribe None |
30 |
|
as an event listener (which changes the event handler stack) |
31 |
|
simply set an instance variable to False. This is checked in |
32 |
|
the event handlers. |
33 |
|
(ThubanGrid.GetNumberSelected): Return the number of currently |
34 |
|
selected rows. |
35 |
|
(TableFrame): Inherit from ThubanFrame so we can have a |
36 |
|
status bar and control buttons. |
37 |
|
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942. |
38 |
|
Explicitly set which items are selected in the operator choice and |
39 |
|
action choice so there is always a valid selection. Fixes RTbug #1941. |
40 |
|
Subscribe to grid cell selection events so we can update the |
41 |
|
status bar. |
42 |
|
(QueryTableFrame.UpdateStatusText): Update the status bar with |
43 |
|
how many rows are in the grid, how many columns, and how many |
44 |
|
rows are selected. |
45 |
|
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell): |
46 |
|
Call UpdateStatusText when cells are (de)selected. |
47 |
|
(QueryTableFrame.OnQuery): Use the string value in the value |
48 |
|
combo if either the selected item index is 0 or if the string |
49 |
|
cannot be found in the predefined list (this happens if the |
50 |
|
user changes the text). Fixes RTbug #1940. |
51 |
|
Only turn off the grid event listeners if there a query comes |
52 |
|
back with a none empty list of ids. in the case that the list |
53 |
|
is empty this causes a grid.ClearSelection() call to actually |
54 |
|
clear the grid selection which causes the selected items in |
55 |
|
the map to be deselected. Fixes RTbug #1939. |
56 |
|
|
57 |
|
* test/test_save.py (XMLWriterTest.Encode): Check return values. |
58 |
|
Fixes RTbug #1851. |
59 |
|
|
60 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
61 |
|
|
62 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |
63 |
|
self.selected_shape with the current selection to make sure the |
64 |
|
contents of the dialog are up to date when it's shown for the |
65 |
|
first time. |
66 |
|
The dialog used to work without this by luck. The recent fix to |
67 |
|
the connector module 'broke' a 'feature' the identify view was |
68 |
|
relying on, i.e that subscribing to a message in response to |
69 |
|
receiving a message of that type would mean that the new |
70 |
|
subscriber would also be called for the same message. |
71 |
|
|
72 |
|
2003-06-12 Jonathan Coles <[email protected]> |
73 |
|
|
74 |
|
* extensions/thuban/gdalwarp.cpp: Removed debug printing as |
75 |
|
the image is rendered. Fixes RTbug #1937. |
76 |
|
|
77 |
|
2003-06-12 Jonathan Coles <[email protected]> |
78 |
|
|
79 |
|
* Thuban/Lib/fileutil.py: As is done under Windows, create the |
80 |
|
user directory if it doesn't exist on a posix system. |
81 |
|
Fixes RTbug #1815. |
82 |
|
|
83 |
|
* Thuban/Model/resource.py (get_user_proj_files): Moved the |
84 |
|
called to get_application_dir here, so that the directory |
85 |
|
will only be called if this method is invoked. |
86 |
|
|
87 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear |
88 |
|
the projfilepath if no projection is selected. |
89 |
|
|
90 |
|
2003-06-12 Jonathan Coles <[email protected]> |
91 |
|
|
92 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw |
93 |
|
the scalebar if the current map has no projection set. |
94 |
|
|
95 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the |
96 |
|
projfilepath label to just the basename of the projection file |
97 |
|
rather than include the entire path. |
98 |
|
|
99 |
|
* Thuban/Model/resource.py: Fix missed proj functions that |
100 |
|
needed to be renamed. |
101 |
|
|
102 |
|
2003-06-12 Jonathan Coles <[email protected]> |
103 |
|
|
104 |
|
* Thuban/Model/classification.py: Removed assert statements that |
105 |
|
tested if the variable was an instance of Color. |
106 |
|
|
107 |
|
* Thuban/Model/color.py (Color): Remove commented code that isn't |
108 |
|
used. |
109 |
|
(Transparent): Renamed from NoColor. Doesn't inherit from Color. |
110 |
|
Fixes RTbug #1835. |
111 |
|
(Transparent.__eq__, Transparent.__ne, Transparent.__repr): New. |
112 |
|
Needed now that the class doesn't inherit from Color. |
113 |
|
|
114 |
|
2003-06-12 Jonathan Coles <[email protected]> |
115 |
|
|
116 |
|
* test/test_save.py (XMLWriterTest.testEncode): Explicitly |
117 |
|
check unicode strings. |
118 |
|
|
119 |
|
* test/test_layer.py: Check for existence of gdal. |
120 |
|
|
121 |
|
2003-06-12 Jonathan Coles <[email protected]> |
122 |
|
|
123 |
|
* Thuban/Model/xmlreader.py: New. Contains the XMLReader class |
124 |
|
that was in load.py |
125 |
|
|
126 |
|
* Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class |
127 |
|
that was in save.py |
128 |
|
|
129 |
|
2003-06-12 Jonathan Coles <[email protected]> |
130 |
|
|
131 |
|
This is largely a collection of bug fixes. We also handle the |
132 |
|
case where gdal is not on the system. The XMLReader and XMLWriter |
133 |
|
classes were moved into there own files to resolve some circular |
134 |
|
import references and because they shouldn't really be in the |
135 |
|
file that is dediciated to reading/writing session files since |
136 |
|
they are also used elsewhere. |
137 |
|
|
138 |
|
* Thuban/Model/classgen.py: Renamed functions to follow the |
139 |
|
function_names_with_underscores style. Fixes RTbug #1903. |
140 |
|
(calculate_quantiles): Raise ValueError if 'percents' is invalid. |
141 |
|
|
142 |
|
* Thuban/Model/layer.py: Import gdal only if it available. |
143 |
|
(RasterLayer): Handle the case where the gdal library is unavailable. |
144 |
|
Addresses RTbug #1877. |
145 |
|
|
146 |
|
* Thuban/Model/load.py (XMLReader): Moved into seperate file |
147 |
|
xmlreader.py. |
148 |
|
|
149 |
|
2003-06-12 Jonathan Coles <[email protected]> |
150 |
|
|
151 |
|
This is largely a collection of bug fixes. We also handle the |
152 |
|
case where gdal is not on the system. The XMLReader and XMLWriter |
153 |
|
classes were moved into there own files to resolve some circular |
154 |
|
import references and because they shouldn't really be in the |
155 |
|
file that is dediciated to reading/writing session files since |
156 |
|
they are also used elsewhere. |
157 |
|
|
158 |
|
* Thuban/Model/classgen.py: Renamed functions to follow the |
159 |
|
function_names_with_underscores style. Fixes RTbug #1903. |
160 |
|
(calculate_quantiles): Raise ValueError if 'percents' is invalid. |
161 |
|
|
162 |
|
* Thuban/Model/layer.py: Import gdal only if it available. |
163 |
|
(RasterLayer): Handle the case where the gdal library is unavailable. |
164 |
|
Addresses RTbug #1877. |
165 |
|
|
166 |
|
* Thuban/Model/load.py (XMLReader): Moved into seperate file |
167 |
|
xmlreader.py. |
168 |
|
|
169 |
|
* Thuban/Model/save.py (escape, XMLWriter): Moved into seperate |
170 |
|
file xmlwriter.py. |
171 |
|
|
172 |
|
* Thuban/Model/resource.py: Renamed functions to following the |
173 |
|
function_names_with_underscores style. |
174 |
|
(has_gdal_support): New function that returns true if the gdal |
175 |
|
library is available. Addresses RTbug #1877. |
176 |
|
|
177 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): |
178 |
|
Display a message box if the gdal library is not available, but |
179 |
|
only if there are any layers that would use it. Addresses RTbug #1877. |
180 |
|
|
181 |
|
* Thuban/UI/classgen.py: Use renamed projection resource functions. |
182 |
|
(GenUniformPanel.__CalcStepping): Fix a slight discrepency |
183 |
|
when using integers versus floats. |
184 |
|
|
185 |
|
* Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to |
186 |
|
determine if the "Add Image Layer" menu option should be |
187 |
|
greyed out or not. Addresses RTbug #1877. |
188 |
|
|
189 |
|
* Thuban/UI/projdialog.py: Use renamed projection resource functions. |
190 |
|
|
191 |
|
* Thuban/UI/renderer.py (MapRenderer.render_map): Only try to |
192 |
|
optimize if a raster layer is visible. Fixes RTbug #1931. |
193 |
|
Only draw the raster layer if the gdal library is available. |
194 |
|
Addresses RTbug #1877. |
195 |
|
|
196 |
|
* test/test_classgen.py: Add tests for generate_singletons, |
197 |
|
generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903. |
198 |
|
(test_calculate_quantiles): Fix some tests to catch the new |
199 |
|
ValueError that is raised. |
200 |
|
|
201 |
|
* test/test_proj.py: Use renamed projection resource functions. |
202 |
|
|
203 |
|
* test/test_save.py (SaveSessionTest.testClassifiedLayer): New |
204 |
|
test for saving classified layers. Fixes RTbug #1902. |
205 |
|
(XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851. |
206 |
|
|
207 |
|
2003-06-12 Jan-Oliver Wagner <[email protected]> |
208 |
|
|
209 |
|
Fix for http://intevation.de/rt/webrt?serial_num=1900. |
210 |
|
|
211 |
|
* Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog. |
212 |
|
|
213 |
|
* Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from |
214 |
|
multiplechoicedialog.py rather than from the wxPython library. |
215 |
|
|
216 |
|
2003-06-11 Frank Koormann <[email protected]> |
217 |
|
|
218 |
|
* Thuban/Lib/fileutil.py (get_application_dir): Minor stability |
219 |
|
update. |
220 |
|
|
221 |
|
2003-06-11 Frank Koormann <[email protected]> |
222 |
|
|
223 |
|
* Thuban/Lib/fileutil.py (get_application_dir): New function to |
224 |
|
determine the absolute .thuban/thuban directory under |
225 |
|
"posix" (os.expanduser) and "nt" (read AppData registry key). |
226 |
|
|
227 |
|
* Thuban/Model/resource.py: Use get_application_dir |
228 |
|
|
229 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
230 |
|
Use get_application_dir. |
231 |
|
|
232 |
|
2003-06-10 Bernhard Herzog <[email protected]> |
233 |
|
|
234 |
|
* Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to |
235 |
|
the messages MAP_LAYERS_REMOVED messages |
236 |
|
(LayerTableFrame.OnClose): Unsubscribe from it. |
237 |
|
(LayerTableFrame.map_layers_removed): New. Receiver for |
238 |
|
MAP_LAYERS_REMOVED. Close the dialog when the layer whose the |
239 |
|
dialog is showing is removed. |
240 |
|
|
241 |
2003-06-10 Bernhard Herzog <[email protected]> |
2003-06-10 Bernhard Herzog <[email protected]> |
242 |
|
|
243 |
* Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy |
* Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy |