1 |
|
2003-04-29 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
Add a visible parameter in the layer XML tag. The default value is |
4 |
|
"true". If anything other than "false" is specified we also assume |
5 |
|
"true". |
6 |
|
|
7 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
8 |
|
|
9 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
10 |
|
of visible from 1 to True. |
11 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
12 |
|
|
13 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
14 |
|
parameter. |
15 |
|
|
16 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
17 |
|
parameter. |
18 |
|
|
19 |
|
* test/test_load.py: Add new test data contents_test_visible. |
20 |
|
(LoadSessionTest.setUp): save test data. |
21 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
22 |
|
is loaded correctly. |
23 |
|
|
24 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
25 |
|
for saving an invisible layer. |
26 |
|
|
27 |
|
2003-04-29 Jonathan Coles <[email protected]> |
28 |
|
|
29 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
30 |
|
legend dialog box and tell it to change its map to the one |
31 |
|
supplied to SetMap(). Fixes RTbug #1770. |
32 |
|
|
33 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
34 |
|
|
35 |
|
Next step of table implementation. Introduce a transient database |
36 |
|
using SQLite that some of the data is copied to on demand. This |
37 |
|
allows us to do joins and other operations that require an index |
38 |
|
for good performance with reasonable efficiency. Thuban now needs |
39 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
40 |
|
haven't tested that. |
41 |
|
|
42 |
|
* Thuban/Model/transientdb.py: New. Transient database |
43 |
|
implementation. |
44 |
|
|
45 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
46 |
|
classes. |
47 |
|
|
48 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
49 |
|
classes to help automatically remove temporary files and |
50 |
|
directories. |
51 |
|
(Session.__init__): New instance variables temp_dir for the |
52 |
|
temporary directory and transient_db for the SQLite database |
53 |
|
(Session.temp_directory): New. Create a temporary directory if not |
54 |
|
yet done and return its name. Use AutoRemoveDir to have it |
55 |
|
automatically deleted |
56 |
|
(Session.TransientDB): Instantiate the transient database if not |
57 |
|
done yet and return it. |
58 |
|
|
59 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
60 |
|
AutoTransientTable so that data is copied to the transient DB on |
61 |
|
demand. |
62 |
|
(SimpleStore): New class that simply combines a table and a |
63 |
|
shapefile |
64 |
|
|
65 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
66 |
|
DBFTable and update its doc-string to reflect the fact that this |
67 |
|
is only the table interface to a DBF file. Table is now an alias |
68 |
|
for DBFTable for temporary backwards compatibility. |
69 |
|
|
70 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
71 |
|
the last reference to the session goes away so that the temporary |
72 |
|
files are removed properly. |
73 |
|
|
74 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
75 |
|
reference to the session to make sure the temporary files are |
76 |
|
removed. |
77 |
|
|
78 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
79 |
|
|
80 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
81 |
|
the __parser instance variable into a normal local variable in |
82 |
|
read. It's only used there and read will never be called more than |
83 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
84 |
|
session object alive for a long time. |
85 |
|
|
86 |
|
2003-04-29 Jonathan Coles <[email protected]> |
87 |
|
|
88 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
89 |
|
Projection an immutable item. Fixes RTbug #1825. |
90 |
|
(Projection.__init__): Initialize instance variables here. |
91 |
|
(ProjFile.Replace): New. Replace the given projection object with |
92 |
|
the new projection object. This solves the problem of needing the |
93 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
94 |
|
allows a projection to change parameters without changing its |
95 |
|
location in the file. |
96 |
|
|
97 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
98 |
|
be of type wxSAVE and should verify overwriting a file. |
99 |
|
|
100 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
101 |
|
ProjFile.Replace() method instead of the mutator |
102 |
|
Projection.SetProjection(). Also requires that we reassign the |
103 |
|
client data to the new projection. |
104 |
|
|
105 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
106 |
|
GetAllParameters() |
107 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
108 |
|
for Replace(). |
109 |
|
|
110 |
|
2003-04-25 Jonathan Coles <[email protected]> |
111 |
|
|
112 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
113 |
|
to save the name of the projection. |
114 |
|
|
115 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
116 |
|
test to verify layer projections are saved correctly. |
117 |
|
|
118 |
|
2003-04-25 Jonathan Coles <[email protected]> |
119 |
|
|
120 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
121 |
|
to "Unknown" if name is None. |
122 |
|
(Projection.SetAllParameters): New. Set the projection's |
123 |
|
parameter list to the one supplied. |
124 |
|
(Projection.SetProjection): New. Set the projection's |
125 |
|
properties to those of the supplied Projection. |
126 |
|
|
127 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
128 |
|
the dialog title to include the map's title. |
129 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
130 |
|
the layer's title. |
131 |
|
|
132 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
133 |
|
error dialogs into a single method call. |
134 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
135 |
|
(ProjFrame.__GetProjection): Return the current state of an |
136 |
|
edited projection or None. |
137 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
138 |
|
shouldn't exist. |
139 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
140 |
|
a projection panel if necessary. |
141 |
|
|
142 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
143 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
144 |
|
ProjFile.SetName. |
145 |
|
|
146 |
|
2003-04-25 Jonathan Coles <[email protected]> |
147 |
|
|
148 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
149 |
|
takes an optional argument to select the current projection. |
150 |
|
This does not guarantee that the item is visible due to |
151 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
152 |
|
|
153 |
|
2003-04-25 Jonathan Coles <[email protected]> |
154 |
|
|
155 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
156 |
|
the projection name and use it when constructing the Projection |
157 |
|
object. |
158 |
|
|
159 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
160 |
|
value for 'name' to None and then test if name is equal to None |
161 |
|
in the body of the constructor. This way the caller doesn't have to |
162 |
|
know what the default value should be. Namely, useful in load.py |
163 |
|
where we have to pick a default value if the 'name' parameter |
164 |
|
doesn't exist in the XML file. |
165 |
|
|
166 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
167 |
|
Tests a file where a layer has a projection. |
168 |
|
|
169 |
2003-04-25 Jonathan Coles <[email protected]> |
2003-04-25 Jonathan Coles <[email protected]> |
170 |
|
|
171 |
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |