23 |
from wxPython.wx import * |
from wxPython.wx import * |
24 |
|
|
25 |
import shapelib |
import shapelib |
26 |
|
import Thuban |
27 |
|
from Thuban import _ |
28 |
from Thuban.Model.data import SHAPETYPE_POLYGON |
from Thuban.Model.data import SHAPETYPE_POLYGON |
29 |
from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_STRING, \ |
from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_STRING, \ |
30 |
FIELDTYPE_DOUBLE |
FIELDTYPE_DOUBLE |
31 |
from Thuban.UI.command import registry, ToolCommand |
from Thuban.UI.command import registry, ToolCommand |
32 |
import Thuban.UI.mainwindow |
from Thuban.UI.mainwindow import main_menu, main_toolbar |
33 |
from Thuban.UI.viewport import Tool |
from Thuban.UI.viewport import Tool |
34 |
|
|
35 |
|
|
144 |
checked = check_shape_draw_tool)) |
checked = check_shape_draw_tool)) |
145 |
|
|
146 |
# Add the command to the toolbar |
# Add the command to the toolbar |
147 |
Thuban.UI.mainwindow.main_toolbar.InsertSeparator() |
main_toolbar.InsertSeparator() |
148 |
Thuban.UI.mainwindow.main_toolbar.InsertItem("shape_draw_tool") |
main_toolbar.InsertItem("shape_draw_tool") |
149 |
|
|
150 |
|
# find the experimental menu (create it anew if not found) |
151 |
|
experimental_menu = main_menu.FindOrInsertMenu('experimental', |
152 |
|
_('Experimenta&l')) |
153 |
|
|
154 |
|
# finally add the new command to the experimental menu |
155 |
|
experimental_menu.InsertItem('shape_draw_tool') |