/[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 1079 by bh, Wed May 28 09:07:53 2003 UTC revision 1203 by jonathan, Fri Jun 13 16:01:26 2003 UTC
# Line 1  Line 1 
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]>
242    
243            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
244            of the receivers list so that unsubscribing in a receiver doesn't
245            modify it while iterating over it.
246    
247            * test/test_connector.py
248            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
249            unsubscribing in a receiver works correctly. See docstring for
250            details
251    
252    2003-06-10  Bernhard Herzog  <[email protected]>
253    
254            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
255            message.
256    
257            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
258            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
259            LAYER_CHANGED will still be sent if the classification changes.
260    
261            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
262            parameter so we can subscribe to some of its messages
263            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
264            and the layer's LAYER_SHAPESTORE_REPLACED
265            (Classifier.unsubscribe_messages): New. Unsubscribe from message
266            subscribed to in __init__
267            (Classifier.map_layers_removed)
268            (Classifier.layer_shapestore_replaced): receivers for the messages
269            subscribed to in __init__. Unsubscribe and close the dialog
270    
271            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
272            the map to the Classifier dialog
273    
274            * test/test_layer.py (SetShapeStoreTests): Derive from
275            SubscriberMixin as well so we can test messages
276            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
277            messages
278            (SetShapeStoreTests.tearDown): Clear the messages again
279            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
280            for the modified flag too
281            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
282            to check whether SetShapeStore sets the modified flag
283            (SetShapeStoreTests.test_set_shape_store_different_field_name)
284            (SetShapeStoreTests.test_set_shape_store_same_field)
285            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
286            Add tests for the messages. This checks both the new
287            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
288    
289    2003-06-06  Jan-Oliver Wagner <[email protected]>
290    
291            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
292            the menu items.
293    
294    2003-06-05  Frank Koormann  <[email protected]>
295    
296            * Thuban/UI/identifyview.py (IdentifyView.__init__):
297            Layout reimplemented without panel. Make life easier to fit the list
298            in the dialog.
299    
300    2003-06-05  Frank Koormann  <[email protected]>
301    
302            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
303            once on initialisation (Former implementation resulted in multiple
304            entries for each projection).
305            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
306            if set, select the projection found under the specified name. This
307            overwrites any other selection estimate.
308            Removed projchoice filling from this method.
309            (ProjFrame._OnSave, ProjFrame._OnAddToList):
310            Updated call of ProjFrame.__FillAvailList
311            (LCCPanel._DoLayout): Moved parameter controls in more common order.
312    
313            * Resources/Projections/defaults.proj: Extended defaults representing
314            various common European projections.
315    
316    2003-06-05  Frank Koormann  <[email protected]>
317    
318            * Thuban/UI/identifyview.py (IdentifyView.__init__):
319            Use ListCtrl instead of GridCtrl
320    
321            * Thuban/Model/resource.py:
322            Guess location of .thuban directory from tempdir parent directory.
323    
324            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
325            Guess location of .thuban directory from tempdir parent directory.
326    
327    2003-06-04  Bernhard Herzog  <[email protected]>
328    
329            Do not cache the values returned by the tree widget's
330            GetFirstChild and GetNextChild methods because it led to lots of
331            segfaults. The new way requires more brute force but is more
332            reliable.
333    
334            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
335            variable layer2id
336            (LegendTree.find_layer): New method to do with brute force what
337            layer2id tried to accomplish
338            (LegendTree._OnMsgLayerChanged)
339            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
340            Use find_layer instead of layer2id
341            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
342            update layer2id anymore
343            (LegendTree._OnMsgMapLayersRemoved)
344            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
345    
346    2003-06-03  Thomas Koester  <[email protected]>
347    
348            * Thuban/Model/classgen.py (GenQuantiles0): New function.
349    
350    2003-06-02  Bernhard Herzog  <[email protected]>
351    
352            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
353            New commands.
354            (main_menu): Add the new commands.
355            (MainWindow.TableRename): New. Implementation of the table_rename
356            command.
357            (MainWindow.RenameLayer): New. Implementation of the layer_rename
358            command.
359    
360            * Thuban/Model/session.py (Session.AddTable): call self.changed to
361            set the modified flag
362    
363            * test/test_session.py (TestSessionSimple.test_add_table): Test
364            whether the modified flag is set properly
365    
366            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
367            instead of issue so that the modified flags get updated.
368    
369            * test/test_base.py (SomeTitledObject): Derive from Modifiable
370            instead of Publisher to reflect reality better and to accomodate
371            the fact that SetTitle now calls changed instead of issue
372    
373    2003-06-02  Bernhard Herzog  <[email protected]>
374    
375            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
376            acquisition has to happen before the try in a try-finally.
377    
378    2003-06-02  Bernhard Herzog  <[email protected]>
379    
380            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
381            possible that a layer is removed that is not currently selected in
382            the legend so don't check for this.
383    
384    2003-05-30  Bernhard Herzog  <[email protected]>
385    
386            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
387            variables to None that have direct or indirect references to
388            shapefiles or dbf files to make sure that they do go away and the
389            files are closed.
390    
391    2003-05-30  Bernhard Herzog  <[email protected]>
392    
393            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
394            availImgListIndices when a new image list is created
395            
396    2003-05-30  Bernhard Herzog  <[email protected]>
397    
398            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
399            changing_selection to indicate whether the LegendTree code itself
400            is currently changing the selection
401            (LegendTree.normalize_selection): New method to normalize the
402            selection by selecting the layer item even if the user clicked on
403            the classification.
404            (LegendTree._OnSelChanged): normalize the selection. This works
405            around a bug in wx which doesn't keep track of the selection
406            properly when subtrees are deleted.
407    
408    2003-05-30  Bernhard Herzog  <[email protected]>
409    
410            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
411            maximum and minimum scale factors.
412    
413            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
414            changes in classgen.py
415    
416    2003-05-30  Jonathan Coles   <[email protected]>
417    
418            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
419            all the methods functions. Fixes RTBug #1903.
420    
421            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
422            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
423            RTBug #1907.
424    
425            * Thuban/UI/classgen.py: Use classgen functions that were part
426            of the ClassGenerator class. Put try/finally blocks around
427            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
428            RTBug #1904.
429    
430            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
431    
432            * Thuban/UI/legend.py: The legend was cleared and repopulated any
433            time something changed which caused some state to be lost such
434            as which children were expanded or collapsed. Fixes RTBug #1901.
435            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
436            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
437            the legend but not in the map.
438            (LegendTree.__FillTree): Move main functionality out into smaller
439            methods that can be used by other methods.
440            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
441            if they are available.
442            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
443            that we override the wxTreeCtrl method. Iterate over children
444            and call __RemoveLayer.
445            (LegendTree.__AddLayer): New. Add a new layer to the legend.
446            (LegendTree.__RemoveLayer): Remove a layer from the legend.
447            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
448            Should only be called with the id of a layer branch.
449            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
450            Returns the root item or creates one if necessary.
451    
452            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
453            ProjectRasterFile with tuple arguments instead of strings.
454    
455            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
456            with try/finally. Fixes RTBug #1904.
457    
458            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
459            with try/finally. Fixes RTBug #1904.
460            (MapCanvas.FitSelectedToWindow): If a single point is selected
461            simply center it on the display. Fixes RTBug #1849.
462    
463            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
464            to be compiled as a standalone app. Now the code can only be
465            called from Python which simplifies the parameter passing.
466            (ProjectRasterFile): Handle Python arguments. Remove code that
467            checks for a destination dataset. Add more clean up code.
468    
469            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
470            TestMapWithContents.test_lower_layer_bottom):
471            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
472            Fixes RTBug #1907.
473    
474            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
475            extent to the map when the legend is toggled. Fixes RTBug #1881.
476    
477    2003-05-29  Jan-Oliver Wagner <[email protected]>
478    
479            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
480            unsubscribes all that is subcribed in __init__.
481    
482    2003-05-28  Bernhard Herzog  <[email protected]>
483    
484            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
485            (MainWindow.CanDuplicateLayer): New methods to implement the
486            Layer/Duplicate command.
487            (layer_duplicate command): New.
488            (main_menu): Add layer_duplicate to the Layer menu.
489    
490    2003-05-28  Bernhard Herzog  <[email protected]>
491    
492            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
493            renderer so that NULL/None values get displayed differently (by a
494            gray rectangle).
495            (TableGrid.__init__): Override the default renderers
496    
497    2003-05-28  Bernhard Herzog  <[email protected]>
498    
499            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
500            classification to "None" if the type of the field has changed.
501    
502            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
503            test for the Layer.SetShapeStore method
504    
505    2003-05-28  Jan-Oliver Wagner <[email protected]>
506    
507            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
508            does not necessarily have a filename).
509    
510    2003-05-28  Jan-Oliver Wagner <[email protected]>
511    
512            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
513            sort the selection list for the dialog.
514    
515    2003-05-28  Frank Koormann  <[email protected]>
516    
517            * extensions/thuban/wxproj.cpp
518            (project_point): Removed cast to int for projected point coordinates.
519            (shape_centroid): Return last point if all polygon vertices fall
520            to one point.
521    
522    2003-05-28  Bernhard Herzog  <[email protected]>
523    
524            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
525            with layers that don't have shapestores, i.e. raster layers.
526    
527  2003-05-28  Bernhard Herzog  <[email protected]>  2003-05-28  Bernhard Herzog  <[email protected]>
528    
529          * Thuban/Model/table.py (DBFTable.__init__): Omit the extension          * Thuban/Model/table.py (DBFTable.__init__): Omit the extension

Legend:
Removed from v.1079  
changed lines
  Added in v.1203

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26