1 |
|
2003-06-18 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
When Thuban loaded the map was redrawn twice because the |
4 |
|
legend was being opened after the mainwindow was created |
5 |
|
and not during its creation. This meant the map was drawn |
6 |
|
initially and then had to be redrawn when the legend |
7 |
|
caused the display to change. Now the legend is opened |
8 |
|
in the mainwindow constructor which resolves this issue. |
9 |
|
|
10 |
|
Also, although we were checking for the existence of |
11 |
|
gdal and gdalwarp modules, the gdalwarp extension was |
12 |
|
still being compiled (which may fail if the system doesn't |
13 |
|
have gdal installed). the build_ext command to setup.py |
14 |
|
now accepts the flags --with-gdal and --without-gdal. |
15 |
|
If --without-gdal is specified setup.py will try to |
16 |
|
use the gdal parameters specified by gdal-config. Under |
17 |
|
windows, those parameters have to be set in setup.py |
18 |
|
as with proj4 an wxWindows. |
19 |
|
|
20 |
|
* setup.py: Use a list instead of seperate variables for |
21 |
|
extension parameters so we can create a generic function |
22 |
|
that runs an appropriate *-config script. |
23 |
|
(run_cs_script): Renamed from run_wx_script and modified |
24 |
|
to accept a second argument which is a list of lists to |
25 |
|
be filled in by the values returned from running the command. |
26 |
|
(thuban_build_ext): New. Extends the build_ext command and |
27 |
|
provides the options --with-gdal/--without-gdal which then |
28 |
|
optionally includes the gdalwarp extension. |
29 |
|
|
30 |
|
* Thuban/Model/resource.py: First check if we can import |
31 |
|
the gdalwarp Thuban extension before checking for gdal. |
32 |
|
Also added some comments. |
33 |
|
|
34 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if |
35 |
|
the map is None which may be the case if none has been loaded |
36 |
|
yet. |
37 |
|
|
38 |
|
* Thuban/UI/main.py (main): Remove call to ShowLegend. |
39 |
|
|
40 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend(). |
41 |
|
|
42 |
|
* Thuban/UI/renderer.py: Check for gdal support before importing |
43 |
|
gdalwarp. |
44 |
|
(MapRenderer.render_map): Only try to optimize if we have gdal |
45 |
|
support otherwise nothing will get drawn. |
46 |
|
|
47 |
|
* Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called |
48 |
|
during startup before a map has been created. Check if map is None |
49 |
|
before using it and do nothing if it is. |
50 |
|
|
51 |
|
2003-06-17 Jonathan Coles <[email protected]> |
52 |
|
|
53 |
|
Fix the problem with raster layers under Windows that caused |
54 |
|
Thuban to crash. The view should respond to layer projection |
55 |
|
changed events to update the display. Changes to a projection |
56 |
|
should not cause the map to be set to full extent. |
57 |
|
|
58 |
|
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable |
59 |
|
current_map_proj to remember the current map projection so that |
60 |
|
when the projection changes we know what the previous projection |
61 |
|
was. |
62 |
|
(MapCanvas.SetMap): Unsubscribe and subscribe to |
63 |
|
LAYER_PROJECTION_CHANGED events. |
64 |
|
(MapCanvas.projection_changed): Split into two methods that respond |
65 |
|
to map and layer projection changes. |
66 |
|
(MapCanvas.map_projection_changed): New. Takes the current view and |
67 |
|
projects it using the new projection. This does not cause the |
68 |
|
map to be redrawn at full extent. |
69 |
|
(MapCanvas.layer_projection_changed): New. Cause a redraw which |
70 |
|
will draw each layer in its new projection. |
71 |
|
|
72 |
|
* extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call |
73 |
|
VSIFClose() not VSIFCloseL() to close the file. Fixes a crash |
74 |
|
under Windows. |
75 |
|
|
76 |
|
* extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be |
77 |
|
to twice sizeof(void*) because there are two digits for each |
78 |
|
hex byte. |
79 |
|
|
80 |
|
2003-06-16 Bernhard Herzog <[email protected]> |
81 |
|
|
82 |
|
Update to the layer interface: Direct access to the table, |
83 |
|
shapetable, shapefile and filename attributes is now actively |
84 |
|
deprecated by issuing deprecation warnings for all places where |
85 |
|
this happens. |
86 |
|
|
87 |
|
* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access |
88 |
|
to the instance variables table, shapetable, shapefile and |
89 |
|
filename via __getattr__ so that we can issue a deprecation |
90 |
|
warning. |
91 |
|
(Layer.SetShapeStore): Don't set the deprecated instance variables |
92 |
|
any more |
93 |
|
(Layer.SetShapeStore): Don't use deprecated layer instance |
94 |
|
variables |
95 |
|
(Layer.Destroy): No need to explicitly remove the instance |
96 |
|
variables any more |
97 |
|
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer |
98 |
|
instance variables |
99 |
|
|
100 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
101 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve) |
102 |
|
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't |
103 |
|
use deprecated layer instance variables |
104 |
|
|
105 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Don't use |
106 |
|
deprecated layer instance variables |
107 |
|
|
108 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
109 |
|
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer |
110 |
|
instance variables |
111 |
|
|
112 |
|
* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use |
113 |
|
deprecated layer instance variables |
114 |
|
|
115 |
|
* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use |
116 |
|
deprecated layer instance variables |
117 |
|
|
118 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Don't use |
119 |
|
deprecated layer instance variables |
120 |
|
|
121 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer) |
122 |
|
(MapRenderer.polygon_render_param): Don't use deprecated layer instance |
123 |
|
variables |
124 |
|
|
125 |
|
* test/runtests.py (main): Turn Thuban's deprecation warnings into |
126 |
|
errors so that they're cought by the tests |
127 |
|
|
128 |
|
* test/test_load.py (TestSingleLayer.test): Don't use deprecated |
129 |
|
layer instance variables |
130 |
|
|
131 |
|
2003-06-16 Jonathan Coles <[email protected]> |
132 |
|
|
133 |
|
Fix a problem under Windows whereby if the user double-clicks on a |
134 |
|
layer in the legend that tree item will expand or collapse as well |
135 |
|
as open the layer properties dialog. The state of the tree item |
136 |
|
should not be affected. |
137 |
|
|
138 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Add instance variable |
139 |
|
preventExpandCollapse and subscribe to expanding and collapsing |
140 |
|
events. |
141 |
|
(LegendTree.OnItemExpandCollapse): New. Responds to expanding and |
142 |
|
collapsing events and will veto the event if it has been triggered |
143 |
|
by the user double clicking on a layer. |
144 |
|
(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate |
145 |
|
that an expanding/collapsing event should be vetoed. |
146 |
|
|
147 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
148 |
|
|
149 |
|
* Thuban/UI/classifier.py (Classifier.OnClose) |
150 |
|
(Classifier.map_layers_removed) |
151 |
|
(Classifier.layer_shapestore_replaced): Unsubscribe the messages |
152 |
|
in OnClose and not in map_layers_removed or |
153 |
|
layer_shapestore_replaced to make sure it always happens when the |
154 |
|
dialog is closed |
155 |
|
|
156 |
|
2003-06-13 Jonathan Coles <[email protected]> |
157 |
|
|
158 |
|
This puts back a fix for Windows where a panel is needed so that |
159 |
|
the background of the table view appears correctly. |
160 |
|
|
161 |
|
* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel |
162 |
|
object that can be used by derived classes to place any |
163 |
|
controls (including the grid) onto. |
164 |
|
(QueryTableFrame.__init__): Use the panel as the parent window |
165 |
|
for all the controls. Reparent the grid so that the panel is |
166 |
|
the parent. Call UpdateStatusText() to correctly initialize |
167 |
|
the status bar. |
168 |
|
|
169 |
|
2003-06-13 Jonathan Coles <[email protected]> |
170 |
|
|
171 |
|
* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits |
172 |
|
from wxFrame (as opposed to wxDialog like the other classes) |
173 |
|
but otherwise behaves like the other classes. This is needed |
174 |
|
for the TableView which isn't really a dialog and needs to |
175 |
|
have a status bar and control buttons. |
176 |
|
|
177 |
|
* Thuban/UI/tableview.py (TableGrid.__init__): Create an |
178 |
|
instance variable to keep track of how many rows are selected. |
179 |
|
Subscribe once to the the events we are interested in. |
180 |
|
(ThubanGrid.OnRangeSelect): Only handle event if event handling |
181 |
|
hasn't been turned off. |
182 |
|
(ThubanGrid.OnSelectCell): Only handle event if event handling |
183 |
|
hasn't been turned off. |
184 |
|
(ThubanGrid.ToggleEventListeners): Rather than subscribe None |
185 |
|
as an event listener (which changes the event handler stack) |
186 |
|
simply set an instance variable to False. This is checked in |
187 |
|
the event handlers. |
188 |
|
(ThubanGrid.GetNumberSelected): Return the number of currently |
189 |
|
selected rows. |
190 |
|
(TableFrame): Inherit from ThubanFrame so we can have a |
191 |
|
status bar and control buttons. |
192 |
|
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942. |
193 |
|
Explicitly set which items are selected in the operator choice and |
194 |
|
action choice so there is always a valid selection. Fixes RTbug #1941. |
195 |
|
Subscribe to grid cell selection events so we can update the |
196 |
|
status bar. |
197 |
|
(QueryTableFrame.UpdateStatusText): Update the status bar with |
198 |
|
how many rows are in the grid, how many columns, and how many |
199 |
|
rows are selected. |
200 |
|
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell): |
201 |
|
Call UpdateStatusText when cells are (de)selected. |
202 |
|
(QueryTableFrame.OnQuery): Use the string value in the value |
203 |
|
combo if either the selected item index is 0 or if the string |
204 |
|
cannot be found in the predefined list (this happens if the |
205 |
|
user changes the text). Fixes RTbug #1940. |
206 |
|
Only turn off the grid event listeners if there a query comes |
207 |
|
back with a none empty list of ids. in the case that the list |
208 |
|
is empty this causes a grid.ClearSelection() call to actually |
209 |
|
clear the grid selection which causes the selected items in |
210 |
|
the map to be deselected. Fixes RTbug #1939. |
211 |
|
|
212 |
|
* test/test_save.py (XMLWriterTest.Encode): Check return values. |
213 |
|
Fixes RTbug #1851. |
214 |
|
|
215 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
216 |
|
|
217 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |
218 |
|
self.selected_shape with the current selection to make sure the |
219 |
|
contents of the dialog are up to date when it's shown for the |
220 |
|
first time. |
221 |
|
The dialog used to work without this by luck. The recent fix to |
222 |
|
the connector module 'broke' a 'feature' the identify view was |
223 |
|
relying on, i.e that subscribing to a message in response to |
224 |
|
receiving a message of that type would mean that the new |
225 |
|
subscriber would also be called for the same message. |
226 |
|
|
227 |
|
2003-06-12 Jonathan Coles <[email protected]> |
228 |
|
|
229 |
|
* extensions/thuban/gdalwarp.cpp: Removed debug printing as |
230 |
|
the image is rendered. Fixes RTbug #1937. |
231 |
|
|
232 |
|
2003-06-12 Jonathan Coles <[email protected]> |
233 |
|
|
234 |
|
* Thuban/Lib/fileutil.py: As is done under Windows, create the |
235 |
|
user directory if it doesn't exist on a posix system. |
236 |
|
Fixes RTbug #1815. |
237 |
|
|
238 |
|
* Thuban/Model/resource.py (get_user_proj_files): Moved the |
239 |
|
called to get_application_dir here, so that the directory |
240 |
|
will only be called if this method is invoked. |
241 |
|
|
242 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear |
243 |
|
the projfilepath if no projection is selected. |
244 |
|
|
245 |
|
2003-06-12 Jonathan Coles <[email protected]> |
246 |
|
|
247 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw |
248 |
|
the scalebar if the current map has no projection set. |
249 |
|
|
250 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the |
251 |
|
projfilepath label to just the basename of the projection file |
252 |
|
rather than include the entire path. |
253 |
|
|
254 |
|
* Thuban/Model/resource.py: Fix missed proj functions that |
255 |
|
needed to be renamed. |
256 |
|
|
257 |
2003-06-12 Jonathan Coles <[email protected]> |
2003-06-12 Jonathan Coles <[email protected]> |
258 |
|
|
259 |
* Thuban/Model/classification.py: Removed assert statements that |
* Thuban/Model/classification.py: Removed assert statements that |