1 |
|
2003-11-11 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all |
4 |
|
instance variables to cut cyclic references. The GC would have |
5 |
|
collected the loader eventually but it can happen that it doesn't |
6 |
|
run at all until thuban is closed (2.3 but not 2.2 tries a bit |
7 |
|
harder and forces a collection when the interpreter terminates) |
8 |
|
(load_session): Call the handler's Destroy method to make sure |
9 |
|
that it gets garbage collected early. Otherwise it will be |
10 |
|
collected very late if at all and it holds some references to e.g. |
11 |
|
shapestores and the session which can lead to leaks (of e.g. the |
12 |
|
temporary files) |
13 |
|
|
14 |
|
* test/test_load.py (TestSingleLayer.test_leak): New. test for the |
15 |
|
resource leak in load_session |
16 |
|
|
17 |
|
2003-11-10 Bernhard Herzog <[email protected]> |
18 |
|
|
19 |
|
* Thuban/UI/baserenderer.py: Add a way to specify how layers in |
20 |
|
extensions are to be rendered. |
21 |
|
(_renderer_extensions): New. List with renderer for layers in |
22 |
|
extensions |
23 |
|
(add_renderer_extension): New. Add a renderer extension |
24 |
|
(init_renderer_extensions): New. Init the renderer extensions |
25 |
|
(BaseRenderer.render_map_incrementally): Search |
26 |
|
_renderer_extensions for how to draw unknown layer types |
27 |
|
(BaseRenderer.draw_raster_data): Add format parameter so that |
28 |
|
formats other than BMP can be drawn |
29 |
|
(BaseRenderer.draw_raster_layer): Pass an explicit format to |
30 |
|
draw_raster_data |
31 |
|
|
32 |
|
* Thuban/UI/renderer.py (raster_format_map): New. Mapping form the |
33 |
|
strings of the format parameter of draw_raster_data method to wx |
34 |
|
constants |
35 |
|
(MapRenderer.draw_raster_data): Add the format parameter and use |
36 |
|
raster_format_map to map it to the right wxwindows constant for |
37 |
|
wxImageFromStream |
38 |
|
|
39 |
|
* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add |
40 |
|
the format parameter and record it |
41 |
|
(TestBaseRenderer.test_raster_no_projection): check the format |
42 |
|
paramter of the draw_raster_data method |
43 |
|
(TestBaseRenderer.test_renderer_extension): New. Test the renderer |
44 |
|
extension facility |
45 |
|
|
46 |
|
2003-11-07 Bernhard Herzog <[email protected]> |
47 |
|
|
48 |
|
Tweak the usage of the sqlite database to make common use cases |
49 |
|
more responsive. In most cases copying the data to the sqlite |
50 |
|
database takes so long that using sqlite doesn't have enough |
51 |
|
advantages. |
52 |
|
|
53 |
|
* Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add |
54 |
|
comments about performance and query the min and max in separate |
55 |
|
statements because only that way will indexes be used. |
56 |
|
(TransientTableBase.UniqueValues): Add some comments about |
57 |
|
performance. |
58 |
|
(AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues): |
59 |
|
Do not copy the data to the transient DB but use the transient |
60 |
|
copy if it exists. See the new comments for the performance trade |
61 |
|
offs |
62 |
|
|
63 |
|
* test/test_transientdb.py |
64 |
|
(TestTransientTable.test_auto_transient_table): Make sure that the |
65 |
|
data is copied to the transient database at some point. |
66 |
|
|
67 |
|
2003-11-03 Bernhard Herzog <[email protected]> |
68 |
|
|
69 |
|
* Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some |
70 |
|
globals to locals so that it's a bit faster |
71 |
|
|
72 |
|
2003-11-03 Bernhard Herzog <[email protected]> |
73 |
|
|
74 |
|
* Thuban/UI/baserenderer.py |
75 |
|
(BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue |
76 |
|
method. ReadValue is faster than ReadRowAsDict since it only reads |
77 |
|
one cell especially now that the dbf file objects actually |
78 |
|
implement it. |
79 |
|
|
80 |
|
* Thuban/Model/table.py (DBFTable.ReadValue): Use the new |
81 |
|
read_attribute method of the dbf objects |
82 |
|
|
83 |
|
2003-11-03 Bernhard Herzog <[email protected]> |
84 |
|
|
85 |
|
* Extensions/profiling/profiling.py (popup_dialog_box): New config |
86 |
|
variable to indicate whether the result should be shown in a |
87 |
|
dialog box |
88 |
|
(profile_screen_renderer, time_screen_renderer): Only show a |
89 |
|
dialog box if popup_dialog_box is true. |
90 |
|
(profile_screen_renderer): Flush stdout after the printing the |
91 |
|
first part of the "profiling..." message |
92 |
|
|
93 |
|
* Thuban/UI/baserenderer.py |
94 |
|
(BaseRenderer.draw_shape_layer_incrementally): Cache the pens and |
95 |
|
brushes for the groups so that they're not created over and over |
96 |
|
again |
97 |
|
|
98 |
|
* Thuban/Model/classification.py (Classification.__getattr__) |
99 |
|
(Classification._compile_classification) |
100 |
|
(Classification._clear_compiled_classification): New. Methods to |
101 |
|
manage a 'compiled' representation of the classification groups |
102 |
|
which is created on demand |
103 |
|
(Classification.InsertGroup, Classification.RemoveGroup) |
104 |
|
(Classification.ReplaceGroup): reset the compiled representation |
105 |
|
(Classification.FindGroup): Use the compiled representation to |
106 |
|
find the matching group |
107 |
|
(ClassGroupRange.GetRangeTuple): New. Return the range as a tuple |
108 |
|
|
109 |
|
2003-10-31 Bernhard Herzog <[email protected]> |
110 |
|
|
111 |
|
* Thuban/Model/classification.py (Classification.SetDefaultGroup): |
112 |
|
Send a CLASS_CHANGED message |
113 |
|
(Classification.RemoveGroup): Send a CLASS_CHANGED message and do |
114 |
|
not return the removed group since it wasn't used. |
115 |
|
|
116 |
|
* test/test_classification.py |
117 |
|
(TestClassification.test_set_default_group): New. Test the |
118 |
|
SetDefaultGroup method |
119 |
|
(TestClassification.test_insert_group): New. Test the InsertGroup |
120 |
|
method |
121 |
|
(TestClassification.test_remove_group): New. Test the RemoveGroup |
122 |
|
method |
123 |
|
(TestClassification.test_replace_group): New. Test the |
124 |
|
ReplaceGroup method |
125 |
|
|
126 |
|
2003-10-31 Bernhard Herzog <[email protected]> |
127 |
|
|
128 |
|
* test/test_classification.py (TestClassification.setUp): |
129 |
|
Subscribe to the CLASS_CHANGED messages |
130 |
|
(TestClassification.tearDown): New. Destroy the classification |
131 |
|
properly |
132 |
|
(TestClassification.test_defaults): Add tests for the default line |
133 |
|
width and whether no messages were sent yet |
134 |
|
(TestClassification.test_set_default_properties): Add tests for |
135 |
|
messages and setting the default line width |
136 |
|
(TestClassification.test_add_singleton) |
137 |
|
(TestClassification.test_add_range) |
138 |
|
(TestClassification.test_multiple_groups): Add tests for messages |
139 |
|
|
140 |
|
2003-10-31 Bernhard Herzog <[email protected]> |
141 |
|
|
142 |
|
Some more refactoring in preparation for new tests: |
143 |
|
|
144 |
|
* test/test_classification.py (TestClassification.setUp): New. |
145 |
|
Instantiate the classification here. Update the test methods |
146 |
|
accordingly. |
147 |
|
(TestClassification.test_multiple_groups): Make sure that the two |
148 |
|
singletons matching 1 are considered different. |
149 |
|
|
150 |
|
2003-10-31 Bernhard Herzog <[email protected]> |
151 |
|
|
152 |
|
* test/test_classification.py (red, green, blue): New. These |
153 |
|
constants were used in several cases. Update the relevant methods. |
154 |
|
(TestClassification.test_defaults) |
155 |
|
(TestClassification.test_set_default_properties) |
156 |
|
(TestClassification.test_add_singleton) |
157 |
|
(TestClassification.test_add_range) |
158 |
|
(TestClassification.test_multiple_groups) |
159 |
|
(TestClassification.test_deepcopy): New. These were formerly all |
160 |
|
part of the single method test. |
161 |
|
(TestClassification.test_deepcopy): Removed. |
162 |
|
(TestClassIterator): Removed. The test case is now a method of |
163 |
|
TestClassification since it tests part of the public interface of |
164 |
|
Classification |
165 |
|
(TestClassification.test_iterator): New. Used to be |
166 |
|
TestClassIterator effectively |
167 |
|
|
168 |
|
2003-10-31 Jan-Oliver Wagner <[email protected]> |
169 |
|
|
170 |
|
GUIfied the functions of the profiling extension. |
171 |
|
|
172 |
|
* /Extensions/profiling/__init__.py: New: Init to make this |
173 |
|
directory a package. |
174 |
|
|
175 |
|
* Extensions/profiling/profiling.py: Moved menu entries to |
176 |
|
the Extensions menu. Applied _() for strings. |
177 |
|
(profile_screen_renderer): Catch the detailed printout and present |
178 |
|
it in a dialog. |
179 |
|
(time_screen_renderer): Raise a dialog to present the result instead |
180 |
|
of printing it to stdout. |
181 |
|
|
182 |
|
2003-10-31 Bernhard Herzog <[email protected]> |
183 |
|
|
184 |
|
* test/test_classification.py (TestClassGroupProperties) |
185 |
|
(TestClassGroup, TestClassGroupDefault, TestClassGroupRange) |
186 |
|
(TestClassGroupSingleton, TestClassIterator, TestClassification): |
187 |
|
Split TestClassification into several classes, one for each class |
188 |
|
being tested. TestClassification itself now only tests |
189 |
|
Classification. This split makes changes to the tests a bit easier |
190 |
|
|
191 |
|
2003-10-31 Bernhard Herzog <[email protected]> |
192 |
|
|
193 |
|
* Extensions/profiling/profiling.py: New. Extension to measure |
194 |
|
Thuban performance |
195 |
|
|
196 |
|
2003-10-31 Frank Koormann <[email protected]> |
197 |
|
|
198 |
|
Added two items to legend popup menu: Remove Layer and Show Layer Table |
199 |
|
|
200 |
|
* Thuban/UI/legend.py (LegendPanel._OnRemoveLayer, |
201 |
|
LegendPanel._OnShowTable): New event handlers, call the corresponding |
202 |
|
mainwindow methods. |
203 |
|
(LegendTree._OnRightClick): Added items to popup menu. |
204 |
|
|
205 |
2003-10-30 Bernhard Herzog <[email protected]> |
2003-10-30 Bernhard Herzog <[email protected]> |
206 |
|
|
207 |
* Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle |
* Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle |