/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1118 by bh, Fri May 30 18:31:35 2003 UTC revision 1318 by jonathan, Mon Jun 30 09:57:16 2003 UTC
# Line 1  Line 1 
1    2003-06-30  Jonathan Coles   <[email protected]>
2    
3            * Thuban/version.py: Update version to 0.8.1
4            
5            * MANIFEST.in: Added Projections so that default.proj is
6            included.
7    
8    2003-06-26  Jonathan Coles   <[email protected]>
9    
10            New About box with lots more information including library
11            versions and credits. More/better version checking before
12            Thuban starts.
13    
14            * Thuban/UI/about.py: New. New About box that displays
15            library version information and credits.
16    
17            * Thuban/version.py: Added new 'versions' dictionary which
18            contains the verions of various libraries which are checked
19            when the module loads.
20            (verify_versions): Check all version numbers and returns
21            a list of errors.
22    
23            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
24            Reset the status of the buttons as the situation warrants,
25            but in a better more reliable way by not relying on the
26            current status to determine what needs to change.
27    
28            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
29            (verify_versions): Remove most of the code since it is
30            now in Thuban.version.verify_versions.o
31    
32            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
33            About box in Thuban.UI.about.
34    
35            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
36            Returns the version of gdal library being used as a string.
37    
38            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
39            Removed.
40            (get_proj_version): Return the version of PROJ that the file
41            was compiled with.
42            (get_gtk_version): Return th version of GTK that the file
43            was compiled with.
44    
45    2003-06-25  Jonathan Coles   <[email protected]>
46    
47            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
48            of the SelectPropertiesDialog should be self so the window
49            appears on top.
50            (ClassGroupPropertiesCtrl.DoEdit): The parent
51            of the SelectPropertiesDialog should be self so the window
52            appears on top.
53    
54            * Thuban/UI/resource.py: Cleaned up how we determine file
55            extensions.
56            (GetImageResource): Return an wxImage from our Resources.
57    
58    2003-06-24  Jonathan Coles   <[email protected]>
59    
60            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
61            Check that a layer has a classification before trying
62            to get it. Raster layers don't have classifications.
63    
64    2003-06-23  Jonathan Coles   <[email protected]>
65            
66            * setup.py: Add Resources/XML to resource list.
67        
68    2003-06-23  Jonathan Coles   <[email protected]>
69    
70            * setup.cfg: Fix copyright dates
71        
72    2003-06-23  Jonathan Coles   <[email protected]>
73    
74            * MANIFEST.in: Update with Resources/XML
75    
76            * setup.py: Don't include Locale resources yet as we don't
77            have any and it causes problems building the distribution
78            for Windows. Update version to 0.8.0.
79    
80            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
81    
82            * Thuban/UI/mainwindow.py: Add blank line at the end because
83            file was not being read correctly building the Windows
84            distribution.
85    
86    2003-06-23  Jonathan Coles   <[email protected]>
87    
88            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
89    
90            * Thuban/version.py: Temporarily update longversion for
91            the 0.8 release so that it doesn't have the cvs revision.
92    
93    2003-06-23  Jonathan Coles   <[email protected]>
94    
95            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
96            to make sure that we don't create reentrant possibilities with
97            wxYield.
98    
99            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
100            directly to avoid the wxSafeYield() call which generates an
101            OnPaint event causing infinite recursion. Don't try to catch
102            exception anymore. This was for before there were limits on map
103            scaling.
104    
105    2003-06-23  Bernhard Herzog  <[email protected]>
106    
107            Bug fix for RT #1961:
108    
109            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
110            Register DerivedShapestores with the session
111    
112            * Thuban/Model/session.py (Session.Tables): Make sure each table
113            is only listed once.
114    
115            * test/test_load.py (TestJoinedTable.test): Add check_format call.
116            Update file contents to match the one written out.
117    
118    2003-06-20  Bernhard Herzog  <[email protected]>
119    
120            * test/xmlsupport.py (SaxEventLister.startElementNS)
121            (SaxEventLister.endElementNS): Do not include the qname. Python
122            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
123            is (presumably incorrectly) None, whereas it's a string with the
124            element name in the later versions.
125    
126            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
127            (TestEventList.test_even_list_namespace): Update tests to reflect
128            the new behaviour
129            (TestEventList.test_even_list_id_normalization): Fix doc-string
130    
131    2003-06-20  Jonathan Coles   <[email protected]>
132    
133            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
134            by deriving classes to determine if that layer supports shapes.
135            (Layer): Override HasShapes and return true.
136    
137            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
138            instead of a direct call to wx[Begin|End]CusyCursor().
139            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
140            table data.
141    
142            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
143            New. Wrappers around the wxWindows functions that allow us to
144            make additional calls such as wxYield which gives the native
145            system a chance to update the cursor correctly.
146    
147            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
148            instead of a direct call to wx[Begin|End]CusyCursor().
149    
150            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
151            instead of a direct call to wx[Begin|End]CusyCursor().
152            (MapCanvas.find_shape_at): Check if the current search layer
153            support shapes, otherwise go on to the next layer.
154    
155            * test/test_layer.py: Add tests in each type of layer for
156            HasClassification() and HasShapes()
157    
158    2003-06-20  Jonathan Coles   <[email protected]>
159    
160            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
161            turning on the busy cursor to allow the system to change the
162            cursor before we begin painting. This fixes a problem that
163            was occuring only under GTK. Fixes RTbug #1840.
164    
165    2003-06-20  Bernhard Herzog  <[email protected]>
166    
167            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
168            version.
169    
170            * Thuban/Model/save.py (sort_data_stores): New. Make topological
171            sort of the data sources so they can be written with sources that
172            data sources that depend on other data sources come after the
173            sources they depend on.
174            (SessionSaver.__init__): Add idmap instance variable to map from
175            objects to the ids used in the file.
176            (SessionSaver.get_id, SessionSaver.define_id)
177            (SessionSaver.has_id): New. Methods to manage the idmap
178            (SessionSaver.write): Use thuban-0.8.dtd
179            (SessionSaver.write_session): Add a namespace on the session and
180            write out the data sources before the maps.
181            (SessionSaver.write_data_containers): New. Write the data
182            containers.
183            (SessionSaver.write_layer): Layer elements now refer to a
184            shapestore and don't contain filenames anymore.
185    
186            * Thuban/Model/load.py (LoadError): Exception class to raise when
187            errors in the files are discovered
188            (SessionLoader.__init__): Define dispatchers for elements with a
189            thuban-0.8 namespace too.
190            (SessionLoader.check_attrs): New helper method to check and
191            convert attributes
192            (AttrDesc): New. Helper class for SessionLoader.check_attrs
193            (SessionLoader.start_fileshapesource)
194            (SessionLoader.start_derivedshapesource)
195            (SessionLoader.start_filetable, SessionLoader.start_jointable):
196            Handlers for the new elements in the new fileformat
197            (SessionLoader.start_layer): Handle the shapestore attribute in
198            addition to filename.
199            (SessionLoader.start_table, SessionLoader.end_table): Removed.
200            They were never used in the old formats and aren't needed for the
201            new.
202    
203            * Thuban/Model/session.py (Session.DataContainers): New method to
204            return all "data containers", i.e. shapestores and tables
205    
206            * test/xmlsupport.py (SaxEventLister.__init__)
207            (SaxEventLister.startElementNS, sax_eventlist): Add support to
208            normalize IDs.
209    
210            * test/test_xmlsupport.py
211            (TestEventList.test_even_list_id_normalization): New test case for
212            id normalization
213    
214            * test/test_load.py (LoadSessionTest.check_format): Use ID
215            normalization
216            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
217            class atrributes used for ID normalization
218            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
219            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
220            file format
221            (TestJoinedTable): New test for loading sessions with joined
222            tables.
223            (TestLoadError): New. Test whether missing required attributes
224            cause a LoadError.
225    
226            * test/test_save.py (SaveSessionTest.thubanids)
227            (SaveSessionTest.thubanidrefs): New class attributes for ID
228            normalization in .thuban files.
229            (SaveSessionTest.compare_xml): Use id-normalization.
230            (SaveSessionTest.testEmptySession)
231            (SaveSessionTest.testLayerProjection)
232            (SaveSessionTest.testRasterLayer)
233            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
234            (SaveSessionTest.testLayerProjection): The filename used was the
235            same as for testSingleLayer. Use a different one.
236            (SaveSessionTest.test_dbf_table)
237            (SaveSessionTest.test_joined_table): New test cases for saving the
238            new data sources structures.
239            (TestStoreSort, MockDataStore): Classes to test the sorting of the
240            data stores for writing.
241    
242            * test/runtests.py: Add CVS keywords
243    
244    2003-06-20  Jonathan Coles   <[email protected]>
245    
246            * test/test_session.py
247            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
248            Use the cultural_landmark-point.dbf file for the store so that
249            the table rows and shape count match.
250    
251    2003-06-20  Jonathan Coles   <[email protected]>
252    
253            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
254            an exception if the number of shapes is different from the
255            number of rows in the table. Address RTbug #1933.
256    
257            * test/test_layer.py (TestLayer.test_derived_store): Add
258            a test for the new exception in DerivedShapeStore.__init__.
259    
260            * test/support.py (FloatTestCase): Removed since there is
261            already FloatComparisonMixin. Fixes RTbug #1954.
262            (FloatComparisonMixin.assertFloatEqual): Include test for
263            infinity that was part of FloatTestCase.
264    
265            * test/test_range.py (RangeTest): Inherit from
266            support.FloatComparisonMixin now that we don't have
267            support.FloatTestCase.
268    
269    2003-06-20  Bernhard Herzog  <[email protected]>
270    
271            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
272            the implementation in xmlsupport instead.
273            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
274    
275            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
276            of test_save
277    
278    2003-06-20  Bernhard Herzog  <[email protected]>
279    
280            * test/test_load.py (LoadSessionTest.check_format): New helper
281            method to make sure the test files we load might have been written
282            by the current thuban version.
283            (ClassificationTest.TestLayers, TestSingleLayer.test)
284            (TestLayerVisibility.test, TestClassification.test)
285            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
286            Add check_format() calls and fix the thuban data to match the data
287            that would be written by saving the session loaded from it.
288    
289            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
290            the same class and function in test_save.
291    
292            * test/test_xmlsupport.py (TestEventList): New. test cases for
293            sax_eventlist
294    
295    2003-06-20  Bernhard Herzog  <[email protected]>
296    
297            * Resources/XML/thuban.dtd: Add comment about which versions of
298            Thuban are covered by this DTD
299            (map): Fix content model for layers and raster layers. There can
300            be any number or layers and raster layers in any order.
301    
302    2003-06-20  Jonathan Coles   <[email protected]>
303    
304            This is mainly about fixing RTbug #1949.
305    
306            * Thuban/Model/classification.py: Remove "from __future__"
307            import statement since python 2.2 is the earliest supported
308            version.
309    
310            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
311            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
312            depending on the units this projection *forwards* into.
313    
314            * Thuban/Model/save.py (SessionSaver.write_classification):
315            Remove unnecessary use of lambdas and nested functions.
316    
317            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
318            adjustment here if the map projection uses degrees.
319    
320            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
321            scale adjust code since it is now done before calling
322            this method. Don't do anything if the map projection
323            is None.
324    
325    2003-06-19  Bernhard Herzog  <[email protected]>
326    
327            Move version specific load tests to their own file.
328    
329            * test/test_load.py: Expand the doc-string to explain a bit how to
330            handle file format changes.
331            (TestClassification.test): Update the docstring as this test is
332            not about Thuban 0.2 anymore.
333    
334            * test/test_load_0_2.py: New file with the load tests for thuban
335            files created with Thuban 0.2 and earlier.
336    
337    2003-06-19  Bernhard Herzog  <[email protected]>
338    
339            Add XML validation to some of the tests. Validation will only be
340            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
341            To make the DTD available to the test cases it's moved into
342            Resources/XML
343    
344            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
345            for versions up to and including 0.2. Two slight changes: added an
346            encoding specification and fixed the comment which refered to
347            GRASS, not Thuban
348    
349            * test/xmlsupport.py: New support module for tests involving XML.
350            Currently there's a mix-in class for XML validation.
351    
352            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
353    
354            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
355            so that we can validate the
356            (SaveSessionTest.testEmptySession)
357            (SaveSessionTest.testSingleLayer)
358            (SaveSessionTest.testSingleLayer)
359            (SaveSessionTest.testLayerProjection)
360            (SaveSessionTest.testRasterLayer)
361            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
362    
363            * test/runtests.py (main): Call print_additional_summary instead
364            of print_garbage_information
365    
366            * test/support.py (resource_dir): New function to return the
367            "Resource" subdirectory
368            (print_additional_summary): New function to combine several
369            summary functions
370            (run_tests): Use print_additional_summary instead of calling
371            print_garbage_information directly
372    
373    2003-06-19  Bernhard Herzog  <[email protected]>
374    
375            * Doc/thuban.dtd (classification): Correct the content model of
376            the classification element.
377            (projection): Add the "name" attribute
378    
379    2003-06-19  Frank Koormann   <[email protected]>
380    
381            MERGE from the greater-ms3 branch.
382    
383            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
384            scale if projection is latlong to get better estimate.
385    
386            Fix problem of hidden properties dialog under windows after double
387            click on layer tree:
388            The tree control always gets an Expanded / Collapsed event after
389            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
390            raises the already displayed window.
391    
392            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
393            raiseProperties initialized to prevent endless loops
394            (LegendTree._OnItemActivated): Depending on self.raiseProperties
395            simply raise the properties or open the dialog and issue a second
396            event.
397    
398    2003-06-18  Jonathan Coles   <[email protected]>
399    
400            * setup.py: Fix a few problems that occured under Windows.
401    
402    2003-06-18  Jonathan Coles   <[email protected]>
403    
404            When Thuban loaded the map was redrawn twice because the
405            legend was being opened after the mainwindow was created
406            and not during its creation. This meant the map was drawn
407            initially and then had to be redrawn when the legend
408            caused the display to change. Now the legend is opened
409            in the mainwindow constructor which resolves this issue.
410    
411            Also, although we were checking for the existence of
412            gdal and gdalwarp modules, the gdalwarp extension was
413            still being compiled (which may fail if the system doesn't
414            have gdal installed). the build_ext command to setup.py
415            now accepts the flags --with-gdal and --without-gdal.
416            If --without-gdal is specified setup.py will try to
417            use the gdal parameters specified by gdal-config. Under
418            windows, those parameters have to be set in setup.py
419            as with proj4 an wxWindows.
420    
421            * setup.py: Use a list instead of seperate variables for
422            extension parameters so we can create a generic function
423            that runs an appropriate *-config script.
424            (run_cs_script): Renamed from run_wx_script and modified
425            to accept a second argument which is a list of lists to
426            be filled in by the values returned from running the command.
427            (thuban_build_ext): New. Extends the build_ext command and
428            provides the options --with-gdal/--without-gdal which then
429            optionally includes the gdalwarp extension.
430    
431            * Thuban/Model/resource.py: First check if we can import
432            the gdalwarp Thuban extension before checking for gdal.
433            Also added some comments.
434            
435            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
436            the map is None which may be the case if none has been loaded
437            yet.
438    
439            * Thuban/UI/main.py (main): Remove call to ShowLegend.
440    
441            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
442    
443            * Thuban/UI/renderer.py: Check for gdal support before importing
444            gdalwarp.
445            (MapRenderer.render_map): Only try to optimize if we have gdal
446            support otherwise nothing will get drawn.
447    
448            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
449            during startup before a map has been created. Check if map is None
450            before using it and do nothing if it is.
451    
452    2003-06-17  Jonathan Coles   <[email protected]>
453    
454            Fix the problem with raster layers under Windows that caused
455            Thuban to crash. The view should respond to layer projection
456            changed events to update the display. Changes to a projection
457            should not cause the map to be set to full extent.
458            
459            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
460            current_map_proj to remember the current map projection so that
461            when the projection changes we know what the previous projection
462            was.
463            (MapCanvas.SetMap): Unsubscribe and subscribe to
464            LAYER_PROJECTION_CHANGED events.
465            (MapCanvas.projection_changed): Split into two methods that respond
466            to map and layer projection changes.
467            (MapCanvas.map_projection_changed): New. Takes the current view and
468            projects it using the new projection. This does not cause the
469            map to be redrawn at full extent.
470            (MapCanvas.layer_projection_changed): New. Cause a redraw which
471            will draw each layer in its new projection.
472            
473            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
474            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
475            under Windows.
476            
477            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
478            to twice sizeof(void*) because there are two digits for each
479            hex byte.
480    
481    2003-06-16  Bernhard Herzog  <[email protected]>
482    
483            Update to the layer interface: Direct access to the table,
484            shapetable, shapefile and filename attributes is now actively
485            deprecated by issuing deprecation warnings for all places where
486            this happens.
487    
488            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
489            to the instance variables table, shapetable, shapefile and
490            filename via __getattr__ so that we can issue a deprecation
491            warning.
492            (Layer.SetShapeStore): Don't set the deprecated instance variables
493            any more
494            (Layer.SetShapeStore): Don't use deprecated layer instance
495            variables
496            (Layer.Destroy): No need to explicitly remove the instance
497            variables any more
498            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
499            instance variables
500    
501            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
502            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
503            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
504            use deprecated layer instance variables
505    
506            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
507            deprecated layer instance variables
508    
509            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
510            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
511            instance variables
512    
513            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
514            deprecated layer instance variables
515    
516            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
517            deprecated layer instance variables
518    
519            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
520            deprecated layer instance variables
521    
522            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
523            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
524            variables
525    
526            * test/runtests.py (main): Turn Thuban's deprecation warnings into
527            errors so that they're cought by the tests
528    
529            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
530            layer instance variables
531    
532    2003-06-16  Jonathan Coles   <[email protected]>
533    
534            Fix a problem under Windows whereby if the user double-clicks on a
535            layer in the legend that tree item will expand or collapse as well
536            as open the layer properties dialog. The state of the tree item
537            should not be affected.
538    
539            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
540            preventExpandCollapse and subscribe to expanding and collapsing
541            events.
542            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
543            collapsing events and will veto the event if it has been triggered
544            by the user double clicking on a layer.
545            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
546            that an expanding/collapsing event should be vetoed.
547    
548    2003-06-13  Bernhard Herzog  <[email protected]>
549    
550            * Thuban/UI/classifier.py (Classifier.OnClose)
551            (Classifier.map_layers_removed)
552            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
553            in OnClose and not in map_layers_removed or
554            layer_shapestore_replaced to make sure it always happens when the
555            dialog is closed
556    
557    2003-06-13  Jonathan Coles   <[email protected]>
558    
559            This puts back a fix for Windows where a panel is needed so that
560            the background of the table view appears correctly.
561    
562            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
563            object that can be used by derived classes to place any
564            controls (including the grid) onto.
565            (QueryTableFrame.__init__): Use the panel as the parent window
566            for all the controls. Reparent the grid so that the panel is
567            the parent. Call UpdateStatusText() to correctly initialize
568            the status bar.
569    
570    2003-06-13  Jonathan Coles   <[email protected]>
571    
572            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
573            from wxFrame (as opposed to wxDialog like the other classes)
574            but otherwise behaves like the other classes. This is needed
575            for the TableView which isn't really a dialog and needs to
576            have a status bar and control buttons.
577    
578            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
579            instance variable to keep track of how many rows are selected.
580            Subscribe once to the the events we are interested in.
581            (ThubanGrid.OnRangeSelect): Only handle event if event handling
582            hasn't been turned off.
583            (ThubanGrid.OnSelectCell): Only handle event if event handling
584            hasn't been turned off.
585            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
586            as an event listener (which changes the event handler stack)
587            simply set an instance variable to False. This is checked in
588            the event handlers.
589            (ThubanGrid.GetNumberSelected): Return the number of currently
590            selected rows.
591            (TableFrame): Inherit from ThubanFrame so we can have a
592            status bar and control buttons.
593            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
594            Explicitly set which items are selected in the operator choice and
595            action choice so there is always a valid selection. Fixes RTbug #1941.
596            Subscribe to grid cell selection events so we can update the
597            status bar.
598            (QueryTableFrame.UpdateStatusText): Update the status bar with
599            how many rows are in the grid, how many columns, and how many
600            rows are selected.
601            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
602            Call UpdateStatusText when cells are (de)selected.
603            (QueryTableFrame.OnQuery): Use the string value in the value
604            combo if either the selected item index is 0 or if the string
605            cannot be found in the predefined list (this happens if the
606            user changes the text). Fixes RTbug #1940.
607            Only turn off the grid event listeners if there a query comes
608            back with a none empty list of ids. in the case that the list
609            is empty this causes a grid.ClearSelection() call to actually
610            clear the grid selection which causes the selected items in
611            the map to be deselected. Fixes RTbug #1939.
612    
613            * test/test_save.py (XMLWriterTest.Encode): Check return values.
614            Fixes RTbug #1851.
615    
616    2003-06-13  Bernhard Herzog  <[email protected]>
617    
618            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
619            self.selected_shape with the current selection to make sure the
620            contents of the dialog are up to date when it's shown for the
621            first time.
622            The dialog used to work without this by luck. The recent fix to
623            the connector module 'broke' a 'feature' the identify view was
624            relying on, i.e that subscribing to a message in response to
625            receiving a message of that type would mean that the new
626            subscriber would also be called for the same message.
627            
628    2003-06-12  Jonathan Coles   <[email protected]>
629    
630            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
631            the image is rendered. Fixes RTbug #1937.
632    
633    2003-06-12  Jonathan Coles   <[email protected]>
634    
635            * Thuban/Lib/fileutil.py: As is done under Windows, create the
636            user directory if it doesn't exist on a posix system.
637            Fixes RTbug #1815.
638    
639            * Thuban/Model/resource.py (get_user_proj_files): Moved the
640            called to get_application_dir here, so that the directory
641            will only be called if this method is invoked.
642    
643            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
644            the projfilepath if no projection is selected.
645    
646    2003-06-12  Jonathan Coles   <[email protected]>
647    
648            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
649            the scalebar if the current map has no projection set.
650    
651            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
652            projfilepath label to just the basename of the projection file
653            rather than include the entire path.
654    
655            * Thuban/Model/resource.py: Fix missed proj functions that
656            needed to be renamed.
657    
658    2003-06-12  Jonathan Coles   <[email protected]>
659    
660            * Thuban/Model/classification.py: Removed assert statements that
661            tested if the variable was an instance of Color.
662    
663            * Thuban/Model/color.py (Color): Remove commented code that isn't
664            used.
665            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
666            Fixes RTbug #1835.
667            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
668            Needed now that the class doesn't inherit from Color.
669    
670    2003-06-12  Jonathan Coles   <[email protected]>
671    
672            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
673            check unicode strings.
674    
675            * test/test_layer.py: Check for existence of gdal.
676    
677    2003-06-12  Jonathan Coles   <[email protected]>
678        
679            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
680            that was in load.py
681    
682            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
683            that was in save.py
684    
685    2003-06-12  Jonathan Coles   <[email protected]>
686    
687            This is largely a collection of bug fixes. We also handle the
688            case where gdal is not on the system. The XMLReader and XMLWriter
689            classes were moved into there own files to resolve some circular
690            import references and because they shouldn't really be in the
691            file that is dediciated to reading/writing session files since
692            they are also used elsewhere.
693    
694            * Thuban/Model/classgen.py: Renamed functions to follow the
695            function_names_with_underscores style. Fixes RTbug #1903.
696            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
697    
698            * Thuban/Model/layer.py: Import gdal only if it available.
699            (RasterLayer): Handle the case where the gdal library is unavailable.
700            Addresses RTbug #1877.
701    
702            * Thuban/Model/load.py (XMLReader): Moved into seperate file
703            xmlreader.py.
704    
705    2003-06-12  Jonathan Coles   <[email protected]>
706    
707            This is largely a collection of bug fixes. We also handle the
708            case where gdal is not on the system. The XMLReader and XMLWriter
709            classes were moved into there own files to resolve some circular
710            import references and because they shouldn't really be in the
711            file that is dediciated to reading/writing session files since
712            they are also used elsewhere.
713    
714            * Thuban/Model/classgen.py: Renamed functions to follow the
715            function_names_with_underscores style. Fixes RTbug #1903.
716            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
717    
718            * Thuban/Model/layer.py: Import gdal only if it available.
719            (RasterLayer): Handle the case where the gdal library is unavailable.
720            Addresses RTbug #1877.
721    
722            * Thuban/Model/load.py (XMLReader): Moved into seperate file
723            xmlreader.py.
724    
725            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
726            file xmlwriter.py.
727    
728            * Thuban/Model/resource.py: Renamed functions to following the
729            function_names_with_underscores style.
730            (has_gdal_support): New function that returns true if the gdal
731            library is available. Addresses RTbug #1877.
732    
733            * Thuban/UI/application.py (ThubanApplication.OpenSession):
734            Display a message box if the gdal library is not available, but
735            only if there are any layers that would use it. Addresses RTbug #1877.
736    
737            * Thuban/UI/classgen.py: Use renamed projection resource functions.
738            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
739            when using integers versus floats.
740    
741            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
742            determine if the "Add Image Layer" menu option should be
743            greyed out or not. Addresses RTbug #1877.
744    
745            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
746    
747            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
748            optimize if a raster layer is visible. Fixes RTbug #1931.
749            Only draw the raster layer if the gdal library is available.
750            Addresses RTbug #1877.
751    
752            * test/test_classgen.py: Add tests for generate_singletons,
753            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
754            (test_calculate_quantiles): Fix some tests to catch the new
755            ValueError that is raised.
756    
757            * test/test_proj.py: Use renamed projection resource functions.
758    
759            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
760            test for saving classified layers. Fixes RTbug #1902.
761            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
762    
763    2003-06-12  Jan-Oliver Wagner <[email protected]>
764    
765            Fix for http://intevation.de/rt/webrt?serial_num=1900.
766    
767            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
768    
769            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
770            multiplechoicedialog.py rather than from the wxPython library.
771    
772    2003-06-11  Frank Koormann  <[email protected]>
773    
774            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
775            update.
776    
777    2003-06-11  Frank Koormann  <[email protected]>
778    
779            * Thuban/Lib/fileutil.py (get_application_dir): New function to
780            determine the absolute .thuban/thuban directory under
781            "posix" (os.expanduser) and "nt" (read AppData registry key).
782    
783            * Thuban/Model/resource.py: Use get_application_dir
784    
785            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
786            Use get_application_dir.
787    
788    2003-06-10  Bernhard Herzog  <[email protected]>
789    
790            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
791            the messages MAP_LAYERS_REMOVED messages
792            (LayerTableFrame.OnClose): Unsubscribe from it.
793            (LayerTableFrame.map_layers_removed): New. Receiver for
794            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
795            dialog is showing is removed.
796    
797    2003-06-10  Bernhard Herzog  <[email protected]>
798    
799            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
800            of the receivers list so that unsubscribing in a receiver doesn't
801            modify it while iterating over it.
802    
803            * test/test_connector.py
804            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
805            unsubscribing in a receiver works correctly. See docstring for
806            details
807    
808    2003-06-10  Bernhard Herzog  <[email protected]>
809    
810            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
811            message.
812    
813            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
814            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
815            LAYER_CHANGED will still be sent if the classification changes.
816    
817            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
818            parameter so we can subscribe to some of its messages
819            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
820            and the layer's LAYER_SHAPESTORE_REPLACED
821            (Classifier.unsubscribe_messages): New. Unsubscribe from message
822            subscribed to in __init__
823            (Classifier.map_layers_removed)
824            (Classifier.layer_shapestore_replaced): receivers for the messages
825            subscribed to in __init__. Unsubscribe and close the dialog
826    
827            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
828            the map to the Classifier dialog
829    
830            * test/test_layer.py (SetShapeStoreTests): Derive from
831            SubscriberMixin as well so we can test messages
832            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
833            messages
834            (SetShapeStoreTests.tearDown): Clear the messages again
835            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
836            for the modified flag too
837            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
838            to check whether SetShapeStore sets the modified flag
839            (SetShapeStoreTests.test_set_shape_store_different_field_name)
840            (SetShapeStoreTests.test_set_shape_store_same_field)
841            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
842            Add tests for the messages. This checks both the new
843            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
844    
845    2003-06-06  Jan-Oliver Wagner <[email protected]>
846    
847            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
848            the menu items.
849    
850    2003-06-05  Frank Koormann  <[email protected]>
851    
852            * Thuban/UI/identifyview.py (IdentifyView.__init__):
853            Layout reimplemented without panel. Make life easier to fit the list
854            in the dialog.
855    
856    2003-06-05  Frank Koormann  <[email protected]>
857    
858            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
859            once on initialisation (Former implementation resulted in multiple
860            entries for each projection).
861            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
862            if set, select the projection found under the specified name. This
863            overwrites any other selection estimate.
864            Removed projchoice filling from this method.
865            (ProjFrame._OnSave, ProjFrame._OnAddToList):
866            Updated call of ProjFrame.__FillAvailList
867            (LCCPanel._DoLayout): Moved parameter controls in more common order.
868    
869            * Resources/Projections/defaults.proj: Extended defaults representing
870            various common European projections.
871    
872    2003-06-05  Frank Koormann  <[email protected]>
873    
874            * Thuban/UI/identifyview.py (IdentifyView.__init__):
875            Use ListCtrl instead of GridCtrl
876    
877            * Thuban/Model/resource.py:
878            Guess location of .thuban directory from tempdir parent directory.
879    
880            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
881            Guess location of .thuban directory from tempdir parent directory.
882    
883    2003-06-04  Bernhard Herzog  <[email protected]>
884    
885            Do not cache the values returned by the tree widget's
886            GetFirstChild and GetNextChild methods because it led to lots of
887            segfaults. The new way requires more brute force but is more
888            reliable.
889    
890            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
891            variable layer2id
892            (LegendTree.find_layer): New method to do with brute force what
893            layer2id tried to accomplish
894            (LegendTree._OnMsgLayerChanged)
895            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
896            Use find_layer instead of layer2id
897            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
898            update layer2id anymore
899            (LegendTree._OnMsgMapLayersRemoved)
900            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
901    
902    2003-06-03  Thomas Koester  <[email protected]>
903    
904            * Thuban/Model/classgen.py (GenQuantiles0): New function.
905    
906    2003-06-02  Bernhard Herzog  <[email protected]>
907    
908            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
909            New commands.
910            (main_menu): Add the new commands.
911            (MainWindow.TableRename): New. Implementation of the table_rename
912            command.
913            (MainWindow.RenameLayer): New. Implementation of the layer_rename
914            command.
915    
916            * Thuban/Model/session.py (Session.AddTable): call self.changed to
917            set the modified flag
918    
919            * test/test_session.py (TestSessionSimple.test_add_table): Test
920            whether the modified flag is set properly
921    
922            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
923            instead of issue so that the modified flags get updated.
924    
925            * test/test_base.py (SomeTitledObject): Derive from Modifiable
926            instead of Publisher to reflect reality better and to accomodate
927            the fact that SetTitle now calls changed instead of issue
928    
929    2003-06-02  Bernhard Herzog  <[email protected]>
930    
931            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
932            acquisition has to happen before the try in a try-finally.
933    
934    2003-06-02  Bernhard Herzog  <[email protected]>
935    
936            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
937            possible that a layer is removed that is not currently selected in
938            the legend so don't check for this.
939    
940  2003-05-30  Bernhard Herzog  <[email protected]>  2003-05-30  Bernhard Herzog  <[email protected]>
941    
942          * Thuban/Model/layer.py (Layer.Destroy): Set all instance          * Thuban/Model/layer.py (Layer.Destroy): Set all instance

Legend:
Removed from v.1118  
changed lines
  Added in v.1318

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26