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