1 |
|
2003-06-16 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
Backport from HEAD. |
4 |
|
|
5 |
|
Fix a problem under Windows whereby if the user double-clicks on a |
6 |
|
layer in the legend that tree item will expand or collapse as well |
7 |
|
as open the layer properties dialog. The state of the tree item |
8 |
|
should not be affected. |
9 |
|
|
10 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Add instance variable |
11 |
|
preventExpandCollapse and subscribe to expanding and collapsing |
12 |
|
events. |
13 |
|
(LegendTree.OnItemExpandCollapse): New. Responds to expanding and |
14 |
|
collapsing events and will veto the event if it has been triggered |
15 |
|
by the user double clicking on a layer. |
16 |
|
(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate |
17 |
|
that an expanding/collapsing event should be vetoed. |
18 |
|
|
19 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
20 |
|
|
21 |
|
Backport from HEAD. |
22 |
|
|
23 |
|
* Thuban/UI/classifier.py (Classifier.map_layers_removed) |
24 |
|
(Classifier.layer_shapestore_replaced, Classifier.OnClose): |
25 |
|
Unsubscribe the messages in OnClose and not in map_layers_removed |
26 |
|
or layer_shapestore_replaced to make sure it always happens when |
27 |
|
the dialog is closed. |
28 |
|
|
29 |
|
2003-06-13 Jonathan Coles <[email protected]> |
30 |
|
|
31 |
|
[NOTE: This is a back-port from the current CVS head] |
32 |
|
|
33 |
|
This puts back a fix for Windows where a panel is needed so that |
34 |
|
the background of the table view appears correctly. |
35 |
|
|
36 |
|
* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel |
37 |
|
object that can be used by derived classes to place any |
38 |
|
controls (including the grid) onto. |
39 |
|
(QueryTableFrame.__init__): Use the panel as the parent window |
40 |
|
for all the controls. Reparent the grid so that the panel is |
41 |
|
the parent. Call UpdateStatusText() to correctly initialize |
42 |
|
the status bar. |
43 |
|
|
44 |
|
* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits |
45 |
|
from wxFrame (as opposed to wxDialog like the other classes) |
46 |
|
but otherwise behaves like the other classes. This is needed |
47 |
|
for the TableView which isn't really a dialog and needs to |
48 |
|
have a status bar and control buttons. |
49 |
|
|
50 |
|
[NOTE: This is a back-port from the current CVS head] |
51 |
|
|
52 |
|
* Thuban/UI/tableview.py (TableGrid.__init__): Create an |
53 |
|
instance variable to keep track of how many rows are selected. |
54 |
|
Subscribe once to the the events we are interested in. |
55 |
|
(ThubanGrid.OnRangeSelect): Only handle event if event handling |
56 |
|
hasn't been turned off. |
57 |
|
(ThubanGrid.OnSelectCell): Only handle event if event handling |
58 |
|
hasn't been turned off. |
59 |
|
(ThubanGrid.ToggleEventListeners): Rather than subscribe None |
60 |
|
as an event listener (which changes the event handler stack) |
61 |
|
simply set an instance variable to False. This is checked in |
62 |
|
the event handlers. |
63 |
|
(ThubanGrid.GetNumberSelected): Return the number of currently |
64 |
|
selected rows. |
65 |
|
(TableFrame): Inherit from ThubanFrame so we can have a |
66 |
|
status bar and control buttons. |
67 |
|
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942. |
68 |
|
Explicitly set which items are selected in the operator choice and |
69 |
|
action choice so there is always a valid selection. Fixes RTbug #1941. |
70 |
|
Subscribe to grid cell selection events so we can update the |
71 |
|
status bar. |
72 |
|
(QueryTableFrame.UpdateStatusText): Update the status bar with |
73 |
|
how many rows are in the grid, how many columns, and how many |
74 |
|
rows are selected. |
75 |
|
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell): |
76 |
|
Call UpdateStatusText when cells are (de)selected. |
77 |
|
(QueryTableFrame.OnQuery): Use the string value in the value |
78 |
|
combo if either the selected item index is 0 or if the string |
79 |
|
cannot be found in the predefined list (this happens if the |
80 |
|
user changes the text). Fixes RTbug #1940. |
81 |
|
Only turn off the grid event listeners if there a query comes |
82 |
|
back with a none empty list of ids. in the case that the list |
83 |
|
is empty this causes a grid.ClearSelection() call to actually |
84 |
|
clear the grid selection which causes the selected items in |
85 |
|
the map to be deselected. Fixes RTbug #1939. |
86 |
|
|
87 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
88 |
|
|
89 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |
90 |
|
self.selected_shape with the current selection to make sure the |
91 |
|
contents of the dialog are up to date when it's shown for the |
92 |
|
first time. |
93 |
|
The dialog used to work without this by luck. The recent fix to |
94 |
|
the connector module 'broke' a 'feature' the identify view was |
95 |
|
relying on, i.e that subscribing to a message in response to |
96 |
|
receiving a message of that type would mean that the new |
97 |
|
subscriber would also be called for the same message. |
98 |
|
|
99 |
|
2003-06-12 Jonathan Coles <[email protected]> |
100 |
|
|
101 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw |
102 |
|
the scalebar if the current map has no projection set. |
103 |
|
|
104 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the |
105 |
|
projfilepath label to just the basename of the projection file |
106 |
|
rather than include the entire path. |
107 |
|
|
108 |
|
2003-06-11 Frank Koormann <[email protected]> |
109 |
|
|
110 |
|
* Thuban/Lib/fileutil.py (get_application_dir): Minor stability |
111 |
|
update. |
112 |
|
|
113 |
|
2003-06-11 Frank Koormann <[email protected]> |
114 |
|
|
115 |
|
* Thuban/Lib/fileutil.py (get_application_dir): New function to |
116 |
|
determine the absolute .thuban/thuban directory under |
117 |
|
"posix" (os.expanduser) and "nt" (read AppData registry key). |
118 |
|
|
119 |
|
* Thuban/Model/resource.py: Use get_application_dir |
120 |
|
|
121 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
122 |
|
Use get_application_dir. |
123 |
|
|
124 |
|
2003-06-10 Bernhard Herzog <[email protected]> |
125 |
|
|
126 |
|
* Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to |
127 |
|
the messages MAP_LAYERS_REMOVED messages |
128 |
|
(LayerTableFrame.OnClose): Unsubscribe from it. |
129 |
|
(LayerTableFrame.map_layers_removed): New. Receiver for |
130 |
|
MAP_LAYERS_REMOVED. Close the dialog when the layer whose the |
131 |
|
dialog is showing is removed. |
132 |
|
|
133 |
|
2003-06-10 Bernhard Herzog <[email protected]> |
134 |
|
|
135 |
|
* Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy |
136 |
|
of the receivers list so that unsubscribing in a receiver doesn't |
137 |
|
modify it while iterating over it. |
138 |
|
|
139 |
|
* test/test_connector.py |
140 |
|
(ConnectorTest.test_disconnect_in_receiver): New. Test whether |
141 |
|
unsubscribing in a receiver works correctly. See docstring for |
142 |
|
details |
143 |
|
|
144 |
|
2003-06-10 Bernhard Herzog <[email protected]> |
145 |
|
|
146 |
|
* Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New |
147 |
|
message. |
148 |
|
|
149 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore): Send |
150 |
|
LAYER_SHAPESTORE_REPLACED when the shapestore changes. A |
151 |
|
LAYER_CHANGED will still be sent if the classification changes. |
152 |
|
|
153 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Add the map as |
154 |
|
parameter so we can subscribe to some of its messages |
155 |
|
(Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED |
156 |
|
and the layer's LAYER_SHAPESTORE_REPLACED |
157 |
|
(Classifier.unsubscribe_messages): New. Unsubscribe from message |
158 |
|
subscribed to in __init__ |
159 |
|
(Classifier.map_layers_removed) |
160 |
|
(Classifier.layer_shapestore_replaced): receivers for the messages |
161 |
|
subscribed to in __init__. Unsubscribe and close the dialog |
162 |
|
|
163 |
|
* Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass |
164 |
|
the map to the Classifier dialog |
165 |
|
|
166 |
|
* test/test_layer.py (SetShapeStoreTests): Derive from |
167 |
|
SubscriberMixin as well so we can test messages |
168 |
|
(SetShapeStoreTests.setUp): Subscribe to some of the layer's |
169 |
|
messages |
170 |
|
(SetShapeStoreTests.tearDown): Clear the messages again |
171 |
|
(SetShapeStoreTests.test_sanity): Expand the doc-string and check |
172 |
|
for the modified flag too |
173 |
|
(SetShapeStoreTests.test_set_shape_store_modified_flag): New test |
174 |
|
to check whether SetShapeStore sets the modified flag |
175 |
|
(SetShapeStoreTests.test_set_shape_store_different_field_name) |
176 |
|
(SetShapeStoreTests.test_set_shape_store_same_field) |
177 |
|
(SetShapeStoreTests.test_set_shape_store_same_field_different_type): |
178 |
|
Add tests for the messages. This checks both the new |
179 |
|
LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED |
180 |
|
|
181 |
|
2003-06-06 Jan-Oliver Wagner <[email protected]> |
182 |
|
|
183 |
|
* Thuban/UI/mainwindow.py: Improved and partly added help texts for |
184 |
|
the menu items. |
185 |
|
|
186 |
|
2003-06-05 Frank Koormann <[email protected]> |
187 |
|
|
188 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): |
189 |
|
Layout reimplemented without panel. Make life easier to fit the list |
190 |
|
in the dialog. |
191 |
|
|
192 |
|
2003-06-05 Frank Koormann <[email protected]> |
193 |
|
|
194 |
|
* Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice |
195 |
|
once on initialisation (Former implementation resulted in multiple |
196 |
|
entries for each projection). |
197 |
|
(ProjFrame.__FillAvailList): selectProj as second optional parameter, |
198 |
|
if set, select the projection found under the specified name. This |
199 |
|
overwrites any other selection estimate. |
200 |
|
Removed projchoice filling from this method. |
201 |
|
(ProjFrame._OnSave, ProjFrame._OnAddToList): |
202 |
|
Updated call of ProjFrame.__FillAvailList |
203 |
|
(LCCPanel._DoLayout): Moved parameter controls in more common order. |
204 |
|
|
205 |
|
* Resources/Projections/defaults.proj: Extended defaults representing |
206 |
|
various common European projections. |
207 |
|
|
208 |
|
2003-06-05 Frank Koormann <[email protected]> |
209 |
|
|
210 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): |
211 |
|
Use ListCtrl instead of GridCtrl |
212 |
|
|
213 |
|
* Thuban/Model/resource.py: |
214 |
|
Guess location of .thuban directory from tempdir parent directory. |
215 |
|
|
216 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
217 |
|
Guess location of .thuban directory from tempdir parent directory. |
218 |
|
|
219 |
|
2003-06-04 Bernhard Herzog <[email protected]> |
220 |
|
|
221 |
|
Do not cache the values returned by the tree widget's |
222 |
|
GetFirstChild and GetNextChild methods because it led to lots of |
223 |
|
segfaults. The new way requires more brute force but is more |
224 |
|
reliable. |
225 |
|
|
226 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Remove instance |
227 |
|
variable layer2id |
228 |
|
(LegendTree.find_layer): New method to do with brute force what |
229 |
|
layer2id tried to accomplish |
230 |
|
(LegendTree._OnMsgLayerChanged) |
231 |
|
(LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer): |
232 |
|
Use find_layer instead of layer2id |
233 |
|
(LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to |
234 |
|
update layer2id anymore |
235 |
|
(LegendTree._OnMsgMapLayersRemoved) |
236 |
|
(LegendTree._OnMsgMapLayersAdded): Get by without layer2id. |
237 |
|
|
238 |
|
2003-06-03 Thomas Koester <[email protected]> |
239 |
|
|
240 |
|
* Thuban/Model/classgen.py (GenQuantiles0): New function. |
241 |
|
|
242 |
|
2003-06-02 Bernhard Herzog <[email protected]> |
243 |
|
|
244 |
|
* Thuban/UI/mainwindow.py (layer_rename command, table_rename command): |
245 |
|
New commands. |
246 |
|
(main_menu): Add the new commands. |
247 |
|
(MainWindow.TableRename): New. Implementation of the table_rename |
248 |
|
command. |
249 |
|
(MainWindow.RenameLayer): New. Implementation of the layer_rename |
250 |
|
command. |
251 |
|
|
252 |
|
* Thuban/Model/session.py (Session.AddTable): call self.changed to |
253 |
|
set the modified flag |
254 |
|
|
255 |
|
* test/test_session.py (TestSessionSimple.test_add_table): Test |
256 |
|
whether the modified flag is set properly |
257 |
|
|
258 |
|
* Thuban/Model/base.py (TitledObject.SetTitle): Call changed |
259 |
|
instead of issue so that the modified flags get updated. |
260 |
|
|
261 |
|
* test/test_base.py (SomeTitledObject): Derive from Modifiable |
262 |
|
instead of Publisher to reflect reality better and to accomodate |
263 |
|
the fact that SetTitle now calls changed instead of issue |
264 |
|
|
265 |
|
2003-06-02 Bernhard Herzog <[email protected]> |
266 |
|
|
267 |
|
* Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource |
268 |
|
acquisition has to happen before the try in a try-finally. |
269 |
|
|
270 |
|
2003-06-02 Bernhard Herzog <[email protected]> |
271 |
|
|
272 |
|
* Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's |
273 |
|
possible that a layer is removed that is not currently selected in |
274 |
|
the legend so don't check for this. |
275 |
|
|
276 |
|
2003-05-30 Bernhard Herzog <[email protected]> |
277 |
|
|
278 |
|
* Thuban/Model/layer.py (Layer.Destroy): Set all instance |
279 |
|
variables to None that have direct or indirect references to |
280 |
|
shapefiles or dbf files to make sure that they do go away and the |
281 |
|
files are closed. |
282 |
|
|
283 |
|
2003-05-30 Bernhard Herzog <[email protected]> |
284 |
|
|
285 |
|
* Thuban/UI/legend.py (LegendTree.GetRootItem): Reset |
286 |
|
availImgListIndices when a new image list is created |
287 |
|
|
288 |
|
2003-05-30 Bernhard Herzog <[email protected]> |
289 |
|
|
290 |
|
* Thuban/UI/legend.py (LegendTree.__init__): New instance variable |
291 |
|
changing_selection to indicate whether the LegendTree code itself |
292 |
|
is currently changing the selection |
293 |
|
(LegendTree.normalize_selection): New method to normalize the |
294 |
|
selection by selecting the layer item even if the user clicked on |
295 |
|
the classification. |
296 |
|
(LegendTree._OnSelChanged): normalize the selection. This works |
297 |
|
around a bug in wx which doesn't keep track of the selection |
298 |
|
properly when subtrees are deleted. |
299 |
|
|
300 |
2003-05-30 Bernhard Herzog <[email protected]> |
2003-05-30 Bernhard Herzog <[email protected]> |
301 |
|
|
302 |
* Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the |
* Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the |