97 |
for name in ["map_zoom_in_tool", "map_zoom_out_tool", "map_pan_tool", |
for name in ["map_zoom_in_tool", "map_zoom_out_tool", "map_pan_tool", |
98 |
"map_identify_tool", "map_label_tool"]: |
"map_identify_tool", "map_label_tool"]: |
99 |
self.add_toolbar_command(toolbar, name) |
self.add_toolbar_command(toolbar, name) |
100 |
|
# call Realize to make sure that the tools appear. |
101 |
|
toolbar.Realize() |
102 |
|
|
103 |
# Create the map canvas |
# Create the map canvas |
104 |
canvas = view.MapCanvas(self, -1) |
canvas = view.MapCanvas(self, -1) |
177 |
command = registry.Command(self.id_to_name[event.GetId()]) |
command = registry.Command(self.id_to_name[event.GetId()]) |
178 |
if command is not None: |
if command is not None: |
179 |
event.Enable(command.Sensitive(self)) |
event.Enable(command.Sensitive(self)) |
|
event.Check(command.Checked(self)) |
|
180 |
event.SetText(command.DynText(self)) |
event.SetText(command.DynText(self)) |
181 |
|
if command.IsCheckCommand(): |
182 |
|
event.Check(command.Checked(self)) |
183 |
|
|
184 |
def NewSession(self): |
def NewSession(self): |
185 |
session = Session("") |
session = Session("") |