1 |
|
2003-06-23 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* Thuban/UI/mainwindow.py (MainWindow.About): Fix text. |
4 |
|
|
5 |
|
* Thuban/version.py: Temporarily update longversion for |
6 |
|
the 0.8 release so that it doesn't have the cvs revision. |
7 |
|
|
8 |
|
2003-06-23 Jonathan Coles <[email protected]> |
9 |
|
|
10 |
|
* Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield |
11 |
|
to make sure that we don't create reentrant possibilities with |
12 |
|
wxYield. |
13 |
|
|
14 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor() |
15 |
|
directly to avoid the wxSafeYield() call which generates an |
16 |
|
OnPaint event causing infinite recursion. Don't try to catch |
17 |
|
exception anymore. This was for before there were limits on map |
18 |
|
scaling. |
19 |
|
|
20 |
|
2003-06-23 Bernhard Herzog <[email protected]> |
21 |
|
|
22 |
|
Bug fix for RT #1961: |
23 |
|
|
24 |
|
* Thuban/Model/load.py (SessionLoader.start_derivedshapesource): |
25 |
|
Register DerivedShapestores with the session |
26 |
|
|
27 |
|
* Thuban/Model/session.py (Session.Tables): Make sure each table |
28 |
|
is only listed once. |
29 |
|
|
30 |
|
* test/test_load.py (TestJoinedTable.test): Add check_format call. |
31 |
|
Update file contents to match the one written out. |
32 |
|
|
33 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
34 |
|
|
35 |
|
* test/xmlsupport.py (SaxEventLister.startElementNS) |
36 |
|
(SaxEventLister.endElementNS): Do not include the qname. Python |
37 |
|
2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it |
38 |
|
is (presumably incorrectly) None, whereas it's a string with the |
39 |
|
element name in the later versions. |
40 |
|
|
41 |
|
* test/test_xmlsupport.py (TestEventList.test_even_list_simple) |
42 |
|
(TestEventList.test_even_list_namespace): Update tests to reflect |
43 |
|
the new behaviour |
44 |
|
(TestEventList.test_even_list_id_normalization): Fix doc-string |
45 |
|
|
46 |
|
2003-06-20 Jonathan Coles <[email protected]> |
47 |
|
|
48 |
|
* Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden |
49 |
|
by deriving classes to determine if that layer supports shapes. |
50 |
|
(Layer): Override HasShapes and return true. |
51 |
|
|
52 |
|
* Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor() |
53 |
|
instead of a direct call to wx[Begin|End]CusyCursor(). |
54 |
|
(GenUniquePanel._OnRetrieve): Set busy cursor while retrieving |
55 |
|
table data. |
56 |
|
|
57 |
|
* Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor): |
58 |
|
New. Wrappers around the wxWindows functions that allow us to |
59 |
|
make additional calls such as wxYield which gives the native |
60 |
|
system a chance to update the cursor correctly. |
61 |
|
|
62 |
|
* Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor() |
63 |
|
instead of a direct call to wx[Begin|End]CusyCursor(). |
64 |
|
|
65 |
|
* Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor() |
66 |
|
instead of a direct call to wx[Begin|End]CusyCursor(). |
67 |
|
(MapCanvas.find_shape_at): Check if the current search layer |
68 |
|
support shapes, otherwise go on to the next layer. |
69 |
|
|
70 |
|
* test/test_layer.py: Add tests in each type of layer for |
71 |
|
HasClassification() and HasShapes() |
72 |
|
|
73 |
|
2003-06-20 Jonathan Coles <[email protected]> |
74 |
|
|
75 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after |
76 |
|
turning on the busy cursor to allow the system to change the |
77 |
|
cursor before we begin painting. This fixes a problem that |
78 |
|
was occuring only under GTK. Fixes RTbug #1840. |
79 |
|
|
80 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
81 |
|
|
82 |
|
* Resources/XML/thuban-0.8.dtd: New DTD for the new file format |
83 |
|
version. |
84 |
|
|
85 |
|
* Thuban/Model/save.py (sort_data_stores): New. Make topological |
86 |
|
sort of the data sources so they can be written with sources that |
87 |
|
data sources that depend on other data sources come after the |
88 |
|
sources they depend on. |
89 |
|
(SessionSaver.__init__): Add idmap instance variable to map from |
90 |
|
objects to the ids used in the file. |
91 |
|
(SessionSaver.get_id, SessionSaver.define_id) |
92 |
|
(SessionSaver.has_id): New. Methods to manage the idmap |
93 |
|
(SessionSaver.write): Use thuban-0.8.dtd |
94 |
|
(SessionSaver.write_session): Add a namespace on the session and |
95 |
|
write out the data sources before the maps. |
96 |
|
(SessionSaver.write_data_containers): New. Write the data |
97 |
|
containers. |
98 |
|
(SessionSaver.write_layer): Layer elements now refer to a |
99 |
|
shapestore and don't contain filenames anymore. |
100 |
|
|
101 |
|
* Thuban/Model/load.py (LoadError): Exception class to raise when |
102 |
|
errors in the files are discovered |
103 |
|
(SessionLoader.__init__): Define dispatchers for elements with a |
104 |
|
thuban-0.8 namespace too. |
105 |
|
(SessionLoader.check_attrs): New helper method to check and |
106 |
|
convert attributes |
107 |
|
(AttrDesc): New. Helper class for SessionLoader.check_attrs |
108 |
|
(SessionLoader.start_fileshapesource) |
109 |
|
(SessionLoader.start_derivedshapesource) |
110 |
|
(SessionLoader.start_filetable, SessionLoader.start_jointable): |
111 |
|
Handlers for the new elements in the new fileformat |
112 |
|
(SessionLoader.start_layer): Handle the shapestore attribute in |
113 |
|
addition to filename. |
114 |
|
(SessionLoader.start_table, SessionLoader.end_table): Removed. |
115 |
|
They were never used in the old formats and aren't needed for the |
116 |
|
new. |
117 |
|
|
118 |
|
* Thuban/Model/session.py (Session.DataContainers): New method to |
119 |
|
return all "data containers", i.e. shapestores and tables |
120 |
|
|
121 |
|
* test/xmlsupport.py (SaxEventLister.__init__) |
122 |
|
(SaxEventLister.startElementNS, sax_eventlist): Add support to |
123 |
|
normalize IDs. |
124 |
|
|
125 |
|
* test/test_xmlsupport.py |
126 |
|
(TestEventList.test_even_list_id_normalization): New test case for |
127 |
|
id normalization |
128 |
|
|
129 |
|
* test/test_load.py (LoadSessionTest.check_format): Use ID |
130 |
|
normalization |
131 |
|
(LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New |
132 |
|
class atrributes used for ID normalization |
133 |
|
(TestSingleLayer, TestLayerVisibility, TestLabels.test) |
134 |
|
(TestLayerProjection.test, TestRasterLayer.test): Adapt to new |
135 |
|
file format |
136 |
|
(TestJoinedTable): New test for loading sessions with joined |
137 |
|
tables. |
138 |
|
(TestLoadError): New. Test whether missing required attributes |
139 |
|
cause a LoadError. |
140 |
|
|
141 |
|
* test/test_save.py (SaveSessionTest.thubanids) |
142 |
|
(SaveSessionTest.thubanidrefs): New class attributes for ID |
143 |
|
normalization in .thuban files. |
144 |
|
(SaveSessionTest.compare_xml): Use id-normalization. |
145 |
|
(SaveSessionTest.testEmptySession) |
146 |
|
(SaveSessionTest.testLayerProjection) |
147 |
|
(SaveSessionTest.testRasterLayer) |
148 |
|
(SaveSessionTest.testClassifiedLayer): Adapt to new file format. |
149 |
|
(SaveSessionTest.testLayerProjection): The filename used was the |
150 |
|
same as for testSingleLayer. Use a different one. |
151 |
|
(SaveSessionTest.test_dbf_table) |
152 |
|
(SaveSessionTest.test_joined_table): New test cases for saving the |
153 |
|
new data sources structures. |
154 |
|
(TestStoreSort, MockDataStore): Classes to test the sorting of the |
155 |
|
data stores for writing. |
156 |
|
|
157 |
|
* test/runtests.py: Add CVS keywords |
158 |
|
|
159 |
|
2003-06-20 Jonathan Coles <[email protected]> |
160 |
|
|
161 |
|
* test/test_session.py |
162 |
|
(UnreferencedTablesTests.test_unreferenced_tables_with_joins): |
163 |
|
Use the cultural_landmark-point.dbf file for the store so that |
164 |
|
the table rows and shape count match. |
165 |
|
|
166 |
|
2003-06-20 Jonathan Coles <[email protected]> |
167 |
|
|
168 |
|
* Thuban/Model/data.py (DerivedShapeStore.__init__): Raise |
169 |
|
an exception if the number of shapes is different from the |
170 |
|
number of rows in the table. Address RTbug #1933. |
171 |
|
|
172 |
|
* test/test_layer.py (TestLayer.test_derived_store): Add |
173 |
|
a test for the new exception in DerivedShapeStore.__init__. |
174 |
|
|
175 |
|
* test/support.py (FloatTestCase): Removed since there is |
176 |
|
already FloatComparisonMixin. Fixes RTbug #1954. |
177 |
|
(FloatComparisonMixin.assertFloatEqual): Include test for |
178 |
|
infinity that was part of FloatTestCase. |
179 |
|
|
180 |
|
* test/test_range.py (RangeTest): Inherit from |
181 |
|
support.FloatComparisonMixin now that we don't have |
182 |
|
support.FloatTestCase. |
183 |
|
|
184 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
185 |
|
|
186 |
|
* test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use |
187 |
|
the implementation in xmlsupport instead. |
188 |
|
(SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport |
189 |
|
|
190 |
|
* test/test_proj.py: Import sax_eventlist from xmlsupport instead |
191 |
|
of test_save |
192 |
|
|
193 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
194 |
|
|
195 |
|
* test/test_load.py (LoadSessionTest.check_format): New helper |
196 |
|
method to make sure the test files we load might have been written |
197 |
|
by the current thuban version. |
198 |
|
(ClassificationTest.TestLayers, TestSingleLayer.test) |
199 |
|
(TestLayerVisibility.test, TestClassification.test) |
200 |
|
(TestLabels.test, TestLayerProjection.test, TestRasterLayer.test): |
201 |
|
Add check_format() calls and fix the thuban data to match the data |
202 |
|
that would be written by saving the session loaded from it. |
203 |
|
|
204 |
|
* test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of |
205 |
|
the same class and function in test_save. |
206 |
|
|
207 |
|
* test/test_xmlsupport.py (TestEventList): New. test cases for |
208 |
|
sax_eventlist |
209 |
|
|
210 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
211 |
|
|
212 |
|
* Resources/XML/thuban.dtd: Add comment about which versions of |
213 |
|
Thuban are covered by this DTD |
214 |
|
(map): Fix content model for layers and raster layers. There can |
215 |
|
be any number or layers and raster layers in any order. |
216 |
|
|
217 |
|
2003-06-20 Jonathan Coles <[email protected]> |
218 |
|
|
219 |
|
This is mainly about fixing RTbug #1949. |
220 |
|
|
221 |
|
* Thuban/Model/classification.py: Remove "from __future__" |
222 |
|
import statement since python 2.2 is the earliest supported |
223 |
|
version. |
224 |
|
|
225 |
|
* Thuban/Model/proj.py (Projection.GetProjectedUnits): New. |
226 |
|
Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES |
227 |
|
depending on the units this projection *forwards* into. |
228 |
|
|
229 |
|
* Thuban/Model/save.py (SessionSaver.write_classification): |
230 |
|
Remove unnecessary use of lambdas and nested functions. |
231 |
|
|
232 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale |
233 |
|
adjustment here if the map projection uses degrees. |
234 |
|
|
235 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove |
236 |
|
scale adjust code since it is now done before calling |
237 |
|
this method. Don't do anything if the map projection |
238 |
|
is None. |
239 |
|
|
240 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
241 |
|
|
242 |
|
Move version specific load tests to their own file. |
243 |
|
|
244 |
|
* test/test_load.py: Expand the doc-string to explain a bit how to |
245 |
|
handle file format changes. |
246 |
|
(TestClassification.test): Update the docstring as this test is |
247 |
|
not about Thuban 0.2 anymore. |
248 |
|
|
249 |
|
* test/test_load_0_2.py: New file with the load tests for thuban |
250 |
|
files created with Thuban 0.2 and earlier. |
251 |
|
|
252 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
253 |
|
|
254 |
|
Add XML validation to some of the tests. Validation will only be |
255 |
|
done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html). |
256 |
|
To make the DTD available to the test cases it's moved into |
257 |
|
Resources/XML |
258 |
|
|
259 |
|
* Resources/XML/thuban.dtd: New. This is now the real Thuban DTD |
260 |
|
for versions up to and including 0.2. Two slight changes: added an |
261 |
|
encoding specification and fixed the comment which refered to |
262 |
|
GRASS, not Thuban |
263 |
|
|
264 |
|
* test/xmlsupport.py: New support module for tests involving XML. |
265 |
|
Currently there's a mix-in class for XML validation. |
266 |
|
|
267 |
|
* test/test_xmlsupport.py: New. Tests for the xmlsupport module |
268 |
|
|
269 |
|
* test/test_save.py (SaveSessionTest): Derive from ValidationTest |
270 |
|
so that we can validate the |
271 |
|
(SaveSessionTest.testEmptySession) |
272 |
|
(SaveSessionTest.testSingleLayer) |
273 |
|
(SaveSessionTest.testSingleLayer) |
274 |
|
(SaveSessionTest.testLayerProjection) |
275 |
|
(SaveSessionTest.testRasterLayer) |
276 |
|
(SaveSessionTest.testClassifiedLayer): Validate the generated XML |
277 |
|
|
278 |
|
* test/runtests.py (main): Call print_additional_summary instead |
279 |
|
of print_garbage_information |
280 |
|
|
281 |
|
* test/support.py (resource_dir): New function to return the |
282 |
|
"Resource" subdirectory |
283 |
|
(print_additional_summary): New function to combine several |
284 |
|
summary functions |
285 |
|
(run_tests): Use print_additional_summary instead of calling |
286 |
|
print_garbage_information directly |
287 |
|
|
288 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
289 |
|
|
290 |
|
* Doc/thuban.dtd (classification): Correct the content model of |
291 |
|
the classification element. |
292 |
|
(projection): Add the "name" attribute |
293 |
|
|
294 |
|
2003-06-19 Frank Koormann <[email protected]> |
295 |
|
|
296 |
|
MERGE from the greater-ms3 branch. |
297 |
|
|
298 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to |
299 |
|
scale if projection is latlong to get better estimate. |
300 |
|
|
301 |
|
Fix problem of hidden properties dialog under windows after double |
302 |
|
click on layer tree: |
303 |
|
The tree control always gets an Expanded / Collapsed event after |
304 |
|
the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply |
305 |
|
raises the already displayed window. |
306 |
|
|
307 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Instance variable |
308 |
|
raiseProperties initialized to prevent endless loops |
309 |
|
(LegendTree._OnItemActivated): Depending on self.raiseProperties |
310 |
|
simply raise the properties or open the dialog and issue a second |
311 |
|
event. |
312 |
|
|
313 |
|
2003-06-18 Jonathan Coles <[email protected]> |
314 |
|
|
315 |
|
* setup.py: Fix a few problems that occured under Windows. |
316 |
|
|
317 |
|
2003-06-18 Jonathan Coles <[email protected]> |
318 |
|
|
319 |
|
When Thuban loaded the map was redrawn twice because the |
320 |
|
legend was being opened after the mainwindow was created |
321 |
|
and not during its creation. This meant the map was drawn |
322 |
|
initially and then had to be redrawn when the legend |
323 |
|
caused the display to change. Now the legend is opened |
324 |
|
in the mainwindow constructor which resolves this issue. |
325 |
|
|
326 |
|
Also, although we were checking for the existence of |
327 |
|
gdal and gdalwarp modules, the gdalwarp extension was |
328 |
|
still being compiled (which may fail if the system doesn't |
329 |
|
have gdal installed). the build_ext command to setup.py |
330 |
|
now accepts the flags --with-gdal and --without-gdal. |
331 |
|
If --without-gdal is specified setup.py will try to |
332 |
|
use the gdal parameters specified by gdal-config. Under |
333 |
|
windows, those parameters have to be set in setup.py |
334 |
|
as with proj4 an wxWindows. |
335 |
|
|
336 |
|
* setup.py: Use a list instead of seperate variables for |
337 |
|
extension parameters so we can create a generic function |
338 |
|
that runs an appropriate *-config script. |
339 |
|
(run_cs_script): Renamed from run_wx_script and modified |
340 |
|
to accept a second argument which is a list of lists to |
341 |
|
be filled in by the values returned from running the command. |
342 |
|
(thuban_build_ext): New. Extends the build_ext command and |
343 |
|
provides the options --with-gdal/--without-gdal which then |
344 |
|
optionally includes the gdalwarp extension. |
345 |
|
|
346 |
|
* Thuban/Model/resource.py: First check if we can import |
347 |
|
the gdalwarp Thuban extension before checking for gdal. |
348 |
|
Also added some comments. |
349 |
|
|
350 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if |
351 |
|
the map is None which may be the case if none has been loaded |
352 |
|
yet. |
353 |
|
|
354 |
|
* Thuban/UI/main.py (main): Remove call to ShowLegend. |
355 |
|
|
356 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend(). |
357 |
|
|
358 |
|
* Thuban/UI/renderer.py: Check for gdal support before importing |
359 |
|
gdalwarp. |
360 |
|
(MapRenderer.render_map): Only try to optimize if we have gdal |
361 |
|
support otherwise nothing will get drawn. |
362 |
|
|
363 |
|
* Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called |
364 |
|
during startup before a map has been created. Check if map is None |
365 |
|
before using it and do nothing if it is. |
366 |
|
|
367 |
|
2003-06-17 Jonathan Coles <[email protected]> |
368 |
|
|
369 |
|
Fix the problem with raster layers under Windows that caused |
370 |
|
Thuban to crash. The view should respond to layer projection |
371 |
|
changed events to update the display. Changes to a projection |
372 |
|
should not cause the map to be set to full extent. |
373 |
|
|
374 |
|
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable |
375 |
|
current_map_proj to remember the current map projection so that |
376 |
|
when the projection changes we know what the previous projection |
377 |
|
was. |
378 |
|
(MapCanvas.SetMap): Unsubscribe and subscribe to |
379 |
|
LAYER_PROJECTION_CHANGED events. |
380 |
|
(MapCanvas.projection_changed): Split into two methods that respond |
381 |
|
to map and layer projection changes. |
382 |
|
(MapCanvas.map_projection_changed): New. Takes the current view and |
383 |
|
projects it using the new projection. This does not cause the |
384 |
|
map to be redrawn at full extent. |
385 |
|
(MapCanvas.layer_projection_changed): New. Cause a redraw which |
386 |
|
will draw each layer in its new projection. |
387 |
|
|
388 |
|
* extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call |
389 |
|
VSIFClose() not VSIFCloseL() to close the file. Fixes a crash |
390 |
|
under Windows. |
391 |
|
|
392 |
|
* extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be |
393 |
|
to twice sizeof(void*) because there are two digits for each |
394 |
|
hex byte. |
395 |
|
|
396 |
|
2003-06-16 Bernhard Herzog <[email protected]> |
397 |
|
|
398 |
|
Update to the layer interface: Direct access to the table, |
399 |
|
shapetable, shapefile and filename attributes is now actively |
400 |
|
deprecated by issuing deprecation warnings for all places where |
401 |
|
this happens. |
402 |
|
|
403 |
|
* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access |
404 |
|
to the instance variables table, shapetable, shapefile and |
405 |
|
filename via __getattr__ so that we can issue a deprecation |
406 |
|
warning. |
407 |
|
(Layer.SetShapeStore): Don't set the deprecated instance variables |
408 |
|
any more |
409 |
|
(Layer.SetShapeStore): Don't use deprecated layer instance |
410 |
|
variables |
411 |
|
(Layer.Destroy): No need to explicitly remove the instance |
412 |
|
variables any more |
413 |
|
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer |
414 |
|
instance variables |
415 |
|
|
416 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
417 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve) |
418 |
|
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't |
419 |
|
use deprecated layer instance variables |
420 |
|
|
421 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Don't use |
422 |
|
deprecated layer instance variables |
423 |
|
|
424 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
425 |
|
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer |
426 |
|
instance variables |
427 |
|
|
428 |
|
* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use |
429 |
|
deprecated layer instance variables |
430 |
|
|
431 |
|
* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use |
432 |
|
deprecated layer instance variables |
433 |
|
|
434 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Don't use |
435 |
|
deprecated layer instance variables |
436 |
|
|
437 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer) |
438 |
|
(MapRenderer.polygon_render_param): Don't use deprecated layer instance |
439 |
|
variables |
440 |
|
|
441 |
|
* test/runtests.py (main): Turn Thuban's deprecation warnings into |
442 |
|
errors so that they're cought by the tests |
443 |
|
|
444 |
|
* test/test_load.py (TestSingleLayer.test): Don't use deprecated |
445 |
|
layer instance variables |
446 |
|
|
447 |
|
2003-06-16 Jonathan Coles <[email protected]> |
448 |
|
|
449 |
|
Fix a problem under Windows whereby if the user double-clicks on a |
450 |
|
layer in the legend that tree item will expand or collapse as well |
451 |
|
as open the layer properties dialog. The state of the tree item |
452 |
|
should not be affected. |
453 |
|
|
454 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Add instance variable |
455 |
|
preventExpandCollapse and subscribe to expanding and collapsing |
456 |
|
events. |
457 |
|
(LegendTree.OnItemExpandCollapse): New. Responds to expanding and |
458 |
|
collapsing events and will veto the event if it has been triggered |
459 |
|
by the user double clicking on a layer. |
460 |
|
(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate |
461 |
|
that an expanding/collapsing event should be vetoed. |
462 |
|
|
463 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
464 |
|
|
465 |
|
* Thuban/UI/classifier.py (Classifier.OnClose) |
466 |
|
(Classifier.map_layers_removed) |
467 |
|
(Classifier.layer_shapestore_replaced): Unsubscribe the messages |
468 |
|
in OnClose and not in map_layers_removed or |
469 |
|
layer_shapestore_replaced to make sure it always happens when the |
470 |
|
dialog is closed |
471 |
|
|
472 |
|
2003-06-13 Jonathan Coles <[email protected]> |
473 |
|
|
474 |
|
This puts back a fix for Windows where a panel is needed so that |
475 |
|
the background of the table view appears correctly. |
476 |
|
|
477 |
|
* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel |
478 |
|
object that can be used by derived classes to place any |
479 |
|
controls (including the grid) onto. |
480 |
|
(QueryTableFrame.__init__): Use the panel as the parent window |
481 |
|
for all the controls. Reparent the grid so that the panel is |
482 |
|
the parent. Call UpdateStatusText() to correctly initialize |
483 |
|
the status bar. |
484 |
|
|
485 |
|
2003-06-13 Jonathan Coles <[email protected]> |
486 |
|
|
487 |
|
* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits |
488 |
|
from wxFrame (as opposed to wxDialog like the other classes) |
489 |
|
but otherwise behaves like the other classes. This is needed |
490 |
|
for the TableView which isn't really a dialog and needs to |
491 |
|
have a status bar and control buttons. |
492 |
|
|
493 |
|
* Thuban/UI/tableview.py (TableGrid.__init__): Create an |
494 |
|
instance variable to keep track of how many rows are selected. |
495 |
|
Subscribe once to the the events we are interested in. |
496 |
|
(ThubanGrid.OnRangeSelect): Only handle event if event handling |
497 |
|
hasn't been turned off. |
498 |
|
(ThubanGrid.OnSelectCell): Only handle event if event handling |
499 |
|
hasn't been turned off. |
500 |
|
(ThubanGrid.ToggleEventListeners): Rather than subscribe None |
501 |
|
as an event listener (which changes the event handler stack) |
502 |
|
simply set an instance variable to False. This is checked in |
503 |
|
the event handlers. |
504 |
|
(ThubanGrid.GetNumberSelected): Return the number of currently |
505 |
|
selected rows. |
506 |
|
(TableFrame): Inherit from ThubanFrame so we can have a |
507 |
|
status bar and control buttons. |
508 |
|
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942. |
509 |
|
Explicitly set which items are selected in the operator choice and |
510 |
|
action choice so there is always a valid selection. Fixes RTbug #1941. |
511 |
|
Subscribe to grid cell selection events so we can update the |
512 |
|
status bar. |
513 |
|
(QueryTableFrame.UpdateStatusText): Update the status bar with |
514 |
|
how many rows are in the grid, how many columns, and how many |
515 |
|
rows are selected. |
516 |
|
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell): |
517 |
|
Call UpdateStatusText when cells are (de)selected. |
518 |
|
(QueryTableFrame.OnQuery): Use the string value in the value |
519 |
|
combo if either the selected item index is 0 or if the string |
520 |
|
cannot be found in the predefined list (this happens if the |
521 |
|
user changes the text). Fixes RTbug #1940. |
522 |
|
Only turn off the grid event listeners if there a query comes |
523 |
|
back with a none empty list of ids. in the case that the list |
524 |
|
is empty this causes a grid.ClearSelection() call to actually |
525 |
|
clear the grid selection which causes the selected items in |
526 |
|
the map to be deselected. Fixes RTbug #1939. |
527 |
|
|
528 |
|
* test/test_save.py (XMLWriterTest.Encode): Check return values. |
529 |
|
Fixes RTbug #1851. |
530 |
|
|
531 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
532 |
|
|
533 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |
534 |
|
self.selected_shape with the current selection to make sure the |
535 |
|
contents of the dialog are up to date when it's shown for the |
536 |
|
first time. |
537 |
|
The dialog used to work without this by luck. The recent fix to |
538 |
|
the connector module 'broke' a 'feature' the identify view was |
539 |
|
relying on, i.e that subscribing to a message in response to |
540 |
|
receiving a message of that type would mean that the new |
541 |
|
subscriber would also be called for the same message. |
542 |
|
|
543 |
|
2003-06-12 Jonathan Coles <[email protected]> |
544 |
|
|
545 |
|
* extensions/thuban/gdalwarp.cpp: Removed debug printing as |
546 |
|
the image is rendered. Fixes RTbug #1937. |
547 |
|
|
548 |
2003-06-12 Jonathan Coles <[email protected]> |
2003-06-12 Jonathan Coles <[email protected]> |
549 |
|
|
550 |
* Thuban/Lib/fileutil.py: As is done under Windows, create the |
* Thuban/Lib/fileutil.py: As is done under Windows, create the |
551 |
user directory if it doesn't exist on a posix system. |
user directory if it doesn't exist on a posix system. |
552 |
|
Fixes RTbug #1815. |
553 |
|
|
554 |
* Thuban/Model/resource.py (get_user_proj_files): Moved the |
* Thuban/Model/resource.py (get_user_proj_files): Moved the |
555 |
called to get_application_dir here, so that the directory |
called to get_application_dir here, so that the directory |