1 |
|
2003-06-13 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
[NOTE: This is a back-port from the current CVS head] |
4 |
|
|
5 |
|
This puts back a fix for Windows where a panel is needed so that |
6 |
|
the background of the table view appears correctly. |
7 |
|
|
8 |
|
* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel |
9 |
|
object that can be used by derived classes to place any |
10 |
|
controls (including the grid) onto. |
11 |
|
(QueryTableFrame.__init__): Use the panel as the parent window |
12 |
|
for all the controls. Reparent the grid so that the panel is |
13 |
|
the parent. Call UpdateStatusText() to correctly initialize |
14 |
|
the status bar. |
15 |
|
|
16 |
|
* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits |
17 |
|
from wxFrame (as opposed to wxDialog like the other classes) |
18 |
|
but otherwise behaves like the other classes. This is needed |
19 |
|
for the TableView which isn't really a dialog and needs to |
20 |
|
have a status bar and control buttons. |
21 |
|
|
22 |
|
[NOTE: This is a back-port from the current CVS head] |
23 |
|
|
24 |
|
* Thuban/UI/tableview.py (TableGrid.__init__): Create an |
25 |
|
instance variable to keep track of how many rows are selected. |
26 |
|
Subscribe once to the the events we are interested in. |
27 |
|
(ThubanGrid.OnRangeSelect): Only handle event if event handling |
28 |
|
hasn't been turned off. |
29 |
|
(ThubanGrid.OnSelectCell): Only handle event if event handling |
30 |
|
hasn't been turned off. |
31 |
|
(ThubanGrid.ToggleEventListeners): Rather than subscribe None |
32 |
|
as an event listener (which changes the event handler stack) |
33 |
|
simply set an instance variable to False. This is checked in |
34 |
|
the event handlers. |
35 |
|
(ThubanGrid.GetNumberSelected): Return the number of currently |
36 |
|
selected rows. |
37 |
|
(TableFrame): Inherit from ThubanFrame so we can have a |
38 |
|
status bar and control buttons. |
39 |
|
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942. |
40 |
|
Explicitly set which items are selected in the operator choice and |
41 |
|
action choice so there is always a valid selection. Fixes RTbug #1941. |
42 |
|
Subscribe to grid cell selection events so we can update the |
43 |
|
status bar. |
44 |
|
(QueryTableFrame.UpdateStatusText): Update the status bar with |
45 |
|
how many rows are in the grid, how many columns, and how many |
46 |
|
rows are selected. |
47 |
|
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell): |
48 |
|
Call UpdateStatusText when cells are (de)selected. |
49 |
|
(QueryTableFrame.OnQuery): Use the string value in the value |
50 |
|
combo if either the selected item index is 0 or if the string |
51 |
|
cannot be found in the predefined list (this happens if the |
52 |
|
user changes the text). Fixes RTbug #1940. |
53 |
|
Only turn off the grid event listeners if there a query comes |
54 |
|
back with a none empty list of ids. in the case that the list |
55 |
|
is empty this causes a grid.ClearSelection() call to actually |
56 |
|
clear the grid selection which causes the selected items in |
57 |
|
the map to be deselected. Fixes RTbug #1939. |
58 |
|
|
59 |
2003-06-13 Bernhard Herzog <[email protected]> |
2003-06-13 Bernhard Herzog <[email protected]> |
60 |
|
|
61 |
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |