1 |
|
2003-06-16 Bernhard Herzog <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
2003-06-12 Jonathan Coles <[email protected]> |
167 |
|
|
168 |
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw |
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw |