/[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 1114 by bh, Fri May 30 15:59:58 2003 UTC revision 1220 by bh, Mon Jun 16 17:43:09 2003 UTC
# Line 1  Line 1 
1    2003-06-16  Bernhard Herzog  <bh@intevation.de>
2    
3            Update to the layer interface: Direct access to the table,
4            shapetable, shapefile and filename attributes is now actively
5            deprecated by issuing deprecation warnings for all places where
6            this happens.
7    
8            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
9            to the instance variables table, shapetable, shapefile and
10            filename via __getattr__ so that we can issue a deprecation
11            warning.
12            (Layer.SetShapeStore): Don't set the deprecated instance variables
13            any more
14            (Layer.SetShapeStore): Don't use deprecated layer instance
15            variables
16            (Layer.Destroy): No need to explicitly remove the instance
17            variables any more
18            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
19            instance variables
20    
21            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
22            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
23            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
24            use deprecated layer instance variables
25    
26            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
27            deprecated layer instance variables
28    
29            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
30            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
31            instance variables
32    
33            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
34            deprecated layer instance variables
35    
36            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
37            deprecated layer instance variables
38    
39            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
40            deprecated layer instance variables
41    
42            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
43            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
44            variables
45    
46            * test/runtests.py (main): Turn Thuban's deprecation warnings into
47            errors so that they're cought by the tests
48    
49            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
50            layer instance variables
51    
52    2003-06-16  Jonathan Coles   <jonathan@intevation.de>
53    
54            Fix a problem under Windows whereby if the user double-clicks on a
55            layer in the legend that tree item will expand or collapse as well
56            as open the layer properties dialog. The state of the tree item
57            should not be affected.
58    
59            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
60            preventExpandCollapse and subscribe to expanding and collapsing
61            events.
62            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
63            collapsing events and will veto the event if it has been triggered
64            by the user double clicking on a layer.
65            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
66            that an expanding/collapsing event should be vetoed.
67    
68    2003-06-13  Bernhard Herzog  <bh@intevation.de>
69    
70            * Thuban/UI/classifier.py (Classifier.OnClose)
71            (Classifier.map_layers_removed)
72            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
73            in OnClose and not in map_layers_removed or
74            layer_shapestore_replaced to make sure it always happens when the
75            dialog is closed
76    
77    2003-06-13  Jonathan Coles   <jonathan@intevation.de>
78    
79            This puts back a fix for Windows where a panel is needed so that
80            the background of the table view appears correctly.
81    
82            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
83            object that can be used by derived classes to place any
84            controls (including the grid) onto.
85            (QueryTableFrame.__init__): Use the panel as the parent window
86            for all the controls. Reparent the grid so that the panel is
87            the parent. Call UpdateStatusText() to correctly initialize
88            the status bar.
89    
90    2003-06-13  Jonathan Coles   <jonathan@intevation.de>
91    
92            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
93            from wxFrame (as opposed to wxDialog like the other classes)
94            but otherwise behaves like the other classes. This is needed
95            for the TableView which isn't really a dialog and needs to
96            have a status bar and control buttons.
97    
98            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
99            instance variable to keep track of how many rows are selected.
100            Subscribe once to the the events we are interested in.
101            (ThubanGrid.OnRangeSelect): Only handle event if event handling
102            hasn't been turned off.
103            (ThubanGrid.OnSelectCell): Only handle event if event handling
104            hasn't been turned off.
105            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
106            as an event listener (which changes the event handler stack)
107            simply set an instance variable to False. This is checked in
108            the event handlers.
109            (ThubanGrid.GetNumberSelected): Return the number of currently
110            selected rows.
111            (TableFrame): Inherit from ThubanFrame so we can have a
112            status bar and control buttons.
113            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
114            Explicitly set which items are selected in the operator choice and
115            action choice so there is always a valid selection. Fixes RTbug #1941.
116            Subscribe to grid cell selection events so we can update the
117            status bar.
118            (QueryTableFrame.UpdateStatusText): Update the status bar with
119            how many rows are in the grid, how many columns, and how many
120            rows are selected.
121            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
122            Call UpdateStatusText when cells are (de)selected.
123            (QueryTableFrame.OnQuery): Use the string value in the value
124            combo if either the selected item index is 0 or if the string
125            cannot be found in the predefined list (this happens if the
126            user changes the text). Fixes RTbug #1940.
127            Only turn off the grid event listeners if there a query comes
128            back with a none empty list of ids. in the case that the list
129            is empty this causes a grid.ClearSelection() call to actually
130            clear the grid selection which causes the selected items in
131            the map to be deselected. Fixes RTbug #1939.
132    
133            * test/test_save.py (XMLWriterTest.Encode): Check return values.
134            Fixes RTbug #1851.
135    
136    2003-06-13  Bernhard Herzog  <bh@intevation.de>
137    
138            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
139            self.selected_shape with the current selection to make sure the
140            contents of the dialog are up to date when it's shown for the
141            first time.
142            The dialog used to work without this by luck. The recent fix to
143            the connector module 'broke' a 'feature' the identify view was
144            relying on, i.e that subscribing to a message in response to
145            receiving a message of that type would mean that the new
146            subscriber would also be called for the same message.
147            
148    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
149    
150            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
151            the image is rendered. Fixes RTbug #1937.
152    
153    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
154    
155            * Thuban/Lib/fileutil.py: As is done under Windows, create the
156            user directory if it doesn't exist on a posix system.
157            Fixes RTbug #1815.
158    
159            * Thuban/Model/resource.py (get_user_proj_files): Moved the
160            called to get_application_dir here, so that the directory
161            will only be called if this method is invoked.
162    
163            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
164            the projfilepath if no projection is selected.
165    
166    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
167    
168            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
169            the scalebar if the current map has no projection set.
170    
171            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
172            projfilepath label to just the basename of the projection file
173            rather than include the entire path.
174    
175            * Thuban/Model/resource.py: Fix missed proj functions that
176            needed to be renamed.
177    
178    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
179    
180            * Thuban/Model/classification.py: Removed assert statements that
181            tested if the variable was an instance of Color.
182    
183            * Thuban/Model/color.py (Color): Remove commented code that isn't
184            used.
185            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
186            Fixes RTbug #1835.
187            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
188            Needed now that the class doesn't inherit from Color.
189    
190    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
191    
192            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
193            check unicode strings.
194    
195            * test/test_layer.py: Check for existence of gdal.
196    
197    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
198        
199            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
200            that was in load.py
201    
202            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
203            that was in save.py
204    
205    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
206    
207            This is largely a collection of bug fixes. We also handle the
208            case where gdal is not on the system. The XMLReader and XMLWriter
209            classes were moved into there own files to resolve some circular
210            import references and because they shouldn't really be in the
211            file that is dediciated to reading/writing session files since
212            they are also used elsewhere.
213    
214            * Thuban/Model/classgen.py: Renamed functions to follow the
215            function_names_with_underscores style. Fixes RTbug #1903.
216            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
217    
218            * Thuban/Model/layer.py: Import gdal only if it available.
219            (RasterLayer): Handle the case where the gdal library is unavailable.
220            Addresses RTbug #1877.
221    
222            * Thuban/Model/load.py (XMLReader): Moved into seperate file
223            xmlreader.py.
224    
225    2003-06-12  Jonathan Coles   <jonathan@intevation.de>
226    
227            This is largely a collection of bug fixes. We also handle the
228            case where gdal is not on the system. The XMLReader and XMLWriter
229            classes were moved into there own files to resolve some circular
230            import references and because they shouldn't really be in the
231            file that is dediciated to reading/writing session files since
232            they are also used elsewhere.
233    
234            * Thuban/Model/classgen.py: Renamed functions to follow the
235            function_names_with_underscores style. Fixes RTbug #1903.
236            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
237    
238            * Thuban/Model/layer.py: Import gdal only if it available.
239            (RasterLayer): Handle the case where the gdal library is unavailable.
240            Addresses RTbug #1877.
241    
242            * Thuban/Model/load.py (XMLReader): Moved into seperate file
243            xmlreader.py.
244    
245            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
246            file xmlwriter.py.
247    
248            * Thuban/Model/resource.py: Renamed functions to following the
249            function_names_with_underscores style.
250            (has_gdal_support): New function that returns true if the gdal
251            library is available. Addresses RTbug #1877.
252    
253            * Thuban/UI/application.py (ThubanApplication.OpenSession):
254            Display a message box if the gdal library is not available, but
255            only if there are any layers that would use it. Addresses RTbug #1877.
256    
257            * Thuban/UI/classgen.py: Use renamed projection resource functions.
258            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
259            when using integers versus floats.
260    
261            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
262            determine if the "Add Image Layer" menu option should be
263            greyed out or not. Addresses RTbug #1877.
264    
265            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
266    
267            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
268            optimize if a raster layer is visible. Fixes RTbug #1931.
269            Only draw the raster layer if the gdal library is available.
270            Addresses RTbug #1877.
271    
272            * test/test_classgen.py: Add tests for generate_singletons,
273            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
274            (test_calculate_quantiles): Fix some tests to catch the new
275            ValueError that is raised.
276    
277            * test/test_proj.py: Use renamed projection resource functions.
278    
279            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
280            test for saving classified layers. Fixes RTbug #1902.
281            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
282    
283    2003-06-12  Jan-Oliver Wagner <jan@intevation.de>
284    
285            Fix for http://intevation.de/rt/webrt?serial_num=1900.
286    
287            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
288    
289            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
290            multiplechoicedialog.py rather than from the wxPython library.
291    
292    2003-06-11  Frank Koormann  <frank.koormann@intevation.de>
293    
294            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
295            update.
296    
297    2003-06-11  Frank Koormann  <frank.koormann@intevation.de>
298    
299            * Thuban/Lib/fileutil.py (get_application_dir): New function to
300            determine the absolute .thuban/thuban directory under
301            "posix" (os.expanduser) and "nt" (read AppData registry key).
302    
303            * Thuban/Model/resource.py: Use get_application_dir
304    
305            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
306            Use get_application_dir.
307    
308    2003-06-10  Bernhard Herzog  <bh@intevation.de>
309    
310            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
311            the messages MAP_LAYERS_REMOVED messages
312            (LayerTableFrame.OnClose): Unsubscribe from it.
313            (LayerTableFrame.map_layers_removed): New. Receiver for
314            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
315            dialog is showing is removed.
316    
317    2003-06-10  Bernhard Herzog  <bh@intevation.de>
318    
319            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
320            of the receivers list so that unsubscribing in a receiver doesn't
321            modify it while iterating over it.
322    
323            * test/test_connector.py
324            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
325            unsubscribing in a receiver works correctly. See docstring for
326            details
327    
328    2003-06-10  Bernhard Herzog  <bh@intevation.de>
329    
330            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
331            message.
332    
333            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
334            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
335            LAYER_CHANGED will still be sent if the classification changes.
336    
337            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
338            parameter so we can subscribe to some of its messages
339            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
340            and the layer's LAYER_SHAPESTORE_REPLACED
341            (Classifier.unsubscribe_messages): New. Unsubscribe from message
342            subscribed to in __init__
343            (Classifier.map_layers_removed)
344            (Classifier.layer_shapestore_replaced): receivers for the messages
345            subscribed to in __init__. Unsubscribe and close the dialog
346    
347            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
348            the map to the Classifier dialog
349    
350            * test/test_layer.py (SetShapeStoreTests): Derive from
351            SubscriberMixin as well so we can test messages
352            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
353            messages
354            (SetShapeStoreTests.tearDown): Clear the messages again
355            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
356            for the modified flag too
357            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
358            to check whether SetShapeStore sets the modified flag
359            (SetShapeStoreTests.test_set_shape_store_different_field_name)
360            (SetShapeStoreTests.test_set_shape_store_same_field)
361            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
362            Add tests for the messages. This checks both the new
363            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
364    
365    2003-06-06  Jan-Oliver Wagner <jan@intevation.de>
366    
367            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
368            the menu items.
369    
370    2003-06-05  Frank Koormann  <frank.koormann@intevation.de>
371    
372            * Thuban/UI/identifyview.py (IdentifyView.__init__):
373            Layout reimplemented without panel. Make life easier to fit the list
374            in the dialog.
375    
376    2003-06-05  Frank Koormann  <frank.koormann@intevation.de>
377    
378            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
379            once on initialisation (Former implementation resulted in multiple
380            entries for each projection).
381            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
382            if set, select the projection found under the specified name. This
383            overwrites any other selection estimate.
384            Removed projchoice filling from this method.
385            (ProjFrame._OnSave, ProjFrame._OnAddToList):
386            Updated call of ProjFrame.__FillAvailList
387            (LCCPanel._DoLayout): Moved parameter controls in more common order.
388    
389            * Resources/Projections/defaults.proj: Extended defaults representing
390            various common European projections.
391    
392    2003-06-05  Frank Koormann  <frank.koormann@intevation.de>
393    
394            * Thuban/UI/identifyview.py (IdentifyView.__init__):
395            Use ListCtrl instead of GridCtrl
396    
397            * Thuban/Model/resource.py:
398            Guess location of .thuban directory from tempdir parent directory.
399    
400            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
401            Guess location of .thuban directory from tempdir parent directory.
402    
403    2003-06-04  Bernhard Herzog  <bh@intevation.de>
404    
405            Do not cache the values returned by the tree widget's
406            GetFirstChild and GetNextChild methods because it led to lots of
407            segfaults. The new way requires more brute force but is more
408            reliable.
409    
410            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
411            variable layer2id
412            (LegendTree.find_layer): New method to do with brute force what
413            layer2id tried to accomplish
414            (LegendTree._OnMsgLayerChanged)
415            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
416            Use find_layer instead of layer2id
417            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
418            update layer2id anymore
419            (LegendTree._OnMsgMapLayersRemoved)
420            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
421    
422    2003-06-03  Thomas Koester  <tkoester@intevation.de>
423    
424            * Thuban/Model/classgen.py (GenQuantiles0): New function.
425    
426    2003-06-02  Bernhard Herzog  <bh@intevation.de>
427    
428            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
429            New commands.
430            (main_menu): Add the new commands.
431            (MainWindow.TableRename): New. Implementation of the table_rename
432            command.
433            (MainWindow.RenameLayer): New. Implementation of the layer_rename
434            command.
435    
436            * Thuban/Model/session.py (Session.AddTable): call self.changed to
437            set the modified flag
438    
439            * test/test_session.py (TestSessionSimple.test_add_table): Test
440            whether the modified flag is set properly
441    
442            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
443            instead of issue so that the modified flags get updated.
444    
445            * test/test_base.py (SomeTitledObject): Derive from Modifiable
446            instead of Publisher to reflect reality better and to accomodate
447            the fact that SetTitle now calls changed instead of issue
448    
449    2003-06-02  Bernhard Herzog  <bh@intevation.de>
450    
451            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
452            acquisition has to happen before the try in a try-finally.
453    
454    2003-06-02  Bernhard Herzog  <bh@intevation.de>
455    
456            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
457            possible that a layer is removed that is not currently selected in
458            the legend so don't check for this.
459    
460    2003-05-30  Bernhard Herzog  <bh@intevation.de>
461    
462            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
463            variables to None that have direct or indirect references to
464            shapefiles or dbf files to make sure that they do go away and the
465            files are closed.
466    
467    2003-05-30  Bernhard Herzog  <bh@intevation.de>
468    
469            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
470            availImgListIndices when a new image list is created
471            
472  2003-05-30  Bernhard Herzog  <bh@intevation.de>  2003-05-30  Bernhard Herzog  <bh@intevation.de>
473    
474          * Thuban/UI/legend.py (LegendTree.__init__): New instance variable          * Thuban/UI/legend.py (LegendTree.__init__): New instance variable

Legend:
Removed from v.1114  
changed lines
  Added in v.1220

root@scm.wald.intevation.org
ViewVC Help
Powered by ViewVC 1.1.26