|
@@ -222,12 +222,11 @@ class VDigitToolbar(BaseToolbar):
|
|
label=_("Remove selected vertex"),
|
|
label=_("Remove selected vertex"),
|
|
desc=_("Left: Select; Ctrl+Left: Unselect; Right: Confirm"),
|
|
desc=_("Left: Select; Ctrl+Left: Unselect; Right: Confirm"),
|
|
),
|
|
),
|
|
- "settings": BaseIcons["settings"].SetLabel(_("Digitization settings")),
|
|
|
|
|
|
+ "settings": BaseIcons["settings"],
|
|
"quit": BaseIcons["quit"].SetLabel(
|
|
"quit": BaseIcons["quit"].SetLabel(
|
|
- label=_("Quit digitizer"), desc=_("Quit digitizer and save changes")
|
|
|
|
|
|
+ label=_("Quit"), desc=_("Quit digitizer and save changes")
|
|
),
|
|
),
|
|
"help": BaseIcons["help"].SetLabel(
|
|
"help": BaseIcons["help"].SetLabel(
|
|
- label=_("Vector Digitizer manual"),
|
|
|
|
desc=_("Show Vector Digitizer manual"),
|
|
desc=_("Show Vector Digitizer manual"),
|
|
),
|
|
),
|
|
"additionalTools": MetaIcon(
|
|
"additionalTools": MetaIcon(
|
|
@@ -236,10 +235,10 @@ class VDigitToolbar(BaseToolbar):
|
|
desc=_("Left: Select; Ctrl+Left: Unselect; Right: Confirm"),
|
|
desc=_("Left: Select; Ctrl+Left: Unselect; Right: Confirm"),
|
|
),
|
|
),
|
|
"undo": MetaIcon(
|
|
"undo": MetaIcon(
|
|
- img="undo", label=_("Undo"), desc=_("Undo previous changes")
|
|
|
|
|
|
+ img="undo", label=_("Undo"), desc=_("Undo previous change")
|
|
),
|
|
),
|
|
"redo": MetaIcon(
|
|
"redo": MetaIcon(
|
|
- img="redo", label=_("Redo"), desc=_("Redo previous changes")
|
|
|
|
|
|
+ img="redo", label=_("Redo"), desc=_("Redo previous change")
|
|
),
|
|
),
|
|
}
|
|
}
|
|
|
|
|
|
@@ -247,97 +246,142 @@ class VDigitToolbar(BaseToolbar):
|
|
data.append((None,))
|
|
data.append((None,))
|
|
if not self.tools or "addPoint" in self.tools:
|
|
if not self.tools or "addPoint" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
- ("addPoint", self.icons["addPoint"], self.OnAddPoint, wx.ITEM_CHECK)
|
|
|
|
|
|
+ (
|
|
|
|
+ ("addPoint", self.icons["addPoint"].label),
|
|
|
|
+ self.icons["addPoint"],
|
|
|
|
+ self.OnAddPoint,
|
|
|
|
+ wx.ITEM_CHECK,
|
|
|
|
+ )
|
|
)
|
|
)
|
|
if not self.tools or "addLine" in self.tools:
|
|
if not self.tools or "addLine" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
- ("addLine", self.icons["addLine"], self.OnAddLine, wx.ITEM_CHECK)
|
|
|
|
|
|
+ (
|
|
|
|
+ ("addLine", self.icons["addLine"].label),
|
|
|
|
+ self.icons["addLine"],
|
|
|
|
+ self.OnAddLine,
|
|
|
|
+ wx.ITEM_CHECK,
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "addArea" in self.tools:
|
|
if not self.tools or "addArea" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
- ("addArea", self.icons["addArea"], self.OnAddAreaTool, wx.ITEM_CHECK)
|
|
|
|
|
|
+ (
|
|
|
|
+ ("addArea", self.icons["addArea"].label),
|
|
|
|
+ self.icons["addArea"],
|
|
|
|
+ self.OnAddAreaTool,
|
|
|
|
+ wx.ITEM_CHECK,
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "deleteLine" in self.tools:
|
|
if not self.tools or "deleteLine" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "deleteLine",
|
|
|
|
|
|
+ ("deleteLine", self.icons["deleteLine"].label),
|
|
self.icons["deleteLine"],
|
|
self.icons["deleteLine"],
|
|
self.OnDeleteLine,
|
|
self.OnDeleteLine,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "deleteArea" in self.tools:
|
|
if not self.tools or "deleteArea" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "deleteArea",
|
|
|
|
|
|
+ ("deleteArea", self.icons["deleteArea"].label),
|
|
self.icons["deleteArea"],
|
|
self.icons["deleteArea"],
|
|
self.OnDeleteArea,
|
|
self.OnDeleteArea,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "moveVertex" in self.tools:
|
|
if not self.tools or "moveVertex" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "moveVertex",
|
|
|
|
|
|
+ ("moveVertex", self.icons["moveVertex"].label),
|
|
self.icons["moveVertex"],
|
|
self.icons["moveVertex"],
|
|
self.OnMoveVertex,
|
|
self.OnMoveVertex,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "addVertex" in self.tools:
|
|
if not self.tools or "addVertex" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
- ("addVertex", self.icons["addVertex"], self.OnAddVertex, wx.ITEM_CHECK)
|
|
|
|
|
|
+ (
|
|
|
|
+ ("addVertex", self.icons["addVertex"].label),
|
|
|
|
+ self.icons["addVertex"],
|
|
|
|
+ self.OnAddVertex,
|
|
|
|
+ wx.ITEM_CHECK,
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "removeVertex" in self.tools:
|
|
if not self.tools or "removeVertex" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "removeVertex",
|
|
|
|
|
|
+ ("removeVertex", self.icons["removeVertex"].label),
|
|
self.icons["removeVertex"],
|
|
self.icons["removeVertex"],
|
|
self.OnRemoveVertex,
|
|
self.OnRemoveVertex,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "editLine" in self.tools:
|
|
if not self.tools or "editLine" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
- ("editLine", self.icons["editLine"], self.OnEditLine, wx.ITEM_CHECK)
|
|
|
|
|
|
+ (
|
|
|
|
+ ("editLine", self.icons["editLine"].label),
|
|
|
|
+ self.icons["editLine"],
|
|
|
|
+ self.OnEditLine,
|
|
|
|
+ wx.ITEM_CHECK,
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "moveLine" in self.tools:
|
|
if not self.tools or "moveLine" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
- ("moveLine", self.icons["moveLine"], self.OnMoveLine, wx.ITEM_CHECK)
|
|
|
|
|
|
+ (
|
|
|
|
+ ("moveLine", self.icons["moveLine"].label),
|
|
|
|
+ self.icons["moveLine"],
|
|
|
|
+ self.OnMoveLine,
|
|
|
|
+ wx.ITEM_CHECK,
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "displayCats" in self.tools:
|
|
if not self.tools or "displayCats" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "displayCats",
|
|
|
|
|
|
+ ("displayCats", self.icons["displayCats"].label),
|
|
self.icons["displayCats"],
|
|
self.icons["displayCats"],
|
|
self.OnDisplayCats,
|
|
self.OnDisplayCats,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "displayAttr" in self.tools:
|
|
if not self.tools or "displayAttr" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "displayAttr",
|
|
|
|
|
|
+ ("displayAttr", self.icons["displayAttr"].label),
|
|
self.icons["displayAttr"],
|
|
self.icons["displayAttr"],
|
|
self.OnDisplayAttr,
|
|
self.OnDisplayAttr,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "additionalSelf.Tools" in self.tools:
|
|
if not self.tools or "additionalSelf.Tools" in self.tools:
|
|
data.append(
|
|
data.append(
|
|
(
|
|
(
|
|
- "additionalTools",
|
|
|
|
|
|
+ (
|
|
|
|
+ "additionalTools",
|
|
|
|
+ self.icons["additionalTools"].label,
|
|
|
|
+ ),
|
|
self.icons["additionalTools"],
|
|
self.icons["additionalTools"],
|
|
self.OnAdditionalToolMenu,
|
|
self.OnAdditionalToolMenu,
|
|
wx.ITEM_CHECK,
|
|
wx.ITEM_CHECK,
|
|
- )
|
|
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
if not self.tools or "undo" in self.tools or "redo" in self.tools:
|
|
if not self.tools or "undo" in self.tools or "redo" in self.tools:
|
|
data.append((None,))
|
|
data.append((None,))
|
|
if not self.tools or "undo" in self.tools:
|
|
if not self.tools or "undo" in self.tools:
|
|
- data.append(("undo", self.icons["undo"], self.OnUndo))
|
|
|
|
|
|
+ data.append(
|
|
|
|
+ (
|
|
|
|
+ ("undo", self.icons["undo"].label),
|
|
|
|
+ self.icons["undo"],
|
|
|
|
+ self.OnUndo,
|
|
|
|
+ ),
|
|
|
|
+ )
|
|
if not self.tools or "redo" in self.tools:
|
|
if not self.tools or "redo" in self.tools:
|
|
- data.append(("redo", self.icons["redo"], self.OnRedo))
|
|
|
|
|
|
+ data.append(
|
|
|
|
+ (
|
|
|
|
+ ("redo", self.icons["redo"].label),
|
|
|
|
+ self.icons["redo"],
|
|
|
|
+ self.OnRedo,
|
|
|
|
+ ),
|
|
|
|
+ )
|
|
if (
|
|
if (
|
|
not self.tools
|
|
not self.tools
|
|
or "settings" in self.tools
|
|
or "settings" in self.tools
|
|
@@ -346,11 +390,29 @@ class VDigitToolbar(BaseToolbar):
|
|
):
|
|
):
|
|
data.append((None,))
|
|
data.append((None,))
|
|
if not self.tools or "settings" in self.tools:
|
|
if not self.tools or "settings" in self.tools:
|
|
- data.append(("settings", self.icons["settings"], self.OnSettings))
|
|
|
|
|
|
+ data.append(
|
|
|
|
+ (
|
|
|
|
+ ("settings", self.icons["settings"].label),
|
|
|
|
+ self.icons["settings"],
|
|
|
|
+ self.OnSettings,
|
|
|
|
+ ),
|
|
|
|
+ )
|
|
if not self.tools or "help" in self.tools:
|
|
if not self.tools or "help" in self.tools:
|
|
- data.append(("help", self.icons["help"], self.OnHelp))
|
|
|
|
|
|
+ data.append(
|
|
|
|
+ (
|
|
|
|
+ ("help", self.icons["help"].label),
|
|
|
|
+ self.icons["help"],
|
|
|
|
+ self.OnHelp,
|
|
|
|
+ ),
|
|
|
|
+ )
|
|
if not self.tools or "quit" in self.tools:
|
|
if not self.tools or "quit" in self.tools:
|
|
- data.append(("quit", self.icons["quit"], self.OnExit))
|
|
|
|
|
|
+ data.append(
|
|
|
|
+ (
|
|
|
|
+ ("quit", self.icons["quit"].label),
|
|
|
|
+ self.icons["quit"],
|
|
|
|
+ self.OnExit,
|
|
|
|
+ ),
|
|
|
|
+ )
|
|
|
|
|
|
return self._getToolbarData(data)
|
|
return self._getToolbarData(data)
|
|
|
|
|