diff --git a/src/Mod/Arch/InitGui.py b/src/Mod/Arch/InitGui.py index 6a1a3ea37..58a97a528 100644 --- a/src/Mod/Arch/InitGui.py +++ b/src/Mod/Arch/InitGui.py @@ -87,7 +87,7 @@ class ArchWorkbench(Workbench): "Draft_Facebinder","Draft_BezCurve"] self.draftmodtools = ["Draft_Move","Draft_Rotate","Draft_Offset", "Draft_Trimex", "Draft_Upgrade", "Draft_Downgrade", "Draft_Scale", - "Draft_Drawing","Draft_Shape2DView","Draft_Draft2Sketch","Draft_Array", + "Draft_Shape2DView","Draft_Draft2Sketch","Draft_Array", "Draft_Clone"] self.draftextratools = ["Draft_WireToBSpline","Draft_AddPoint","Draft_DelPoint","Draft_ShapeString","Draft_PathArray"] self.draftcontexttools = ["Draft_ApplyStyle","Draft_ToggleDisplayMode","Draft_AddToGroup", diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index 1afa3dcdd..2a8b7db30 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -110,7 +110,7 @@ class DraftWorkbench (Workbench): "Draft_ShapeString","Draft_Facebinder","Draft_BezCurve"] self.modList = ["Draft_Move","Draft_Rotate","Draft_Offset", "Draft_Trimex", "Draft_Upgrade", "Draft_Downgrade", "Draft_Scale", - "Draft_Drawing","Draft_Edit","Draft_WireToBSpline","Draft_AddPoint", + "Draft_Edit","Draft_WireToBSpline","Draft_AddPoint", "Draft_DelPoint","Draft_Shape2DView","Draft_Draft2Sketch","Draft_Array", "Draft_PathArray","Draft_Clone"] self.treecmdList = ["Draft_ApplyStyle","Draft_ToggleDisplayMode","Draft_AddToGroup", diff --git a/src/Mod/Drawing/Gui/Command.cpp b/src/Mod/Drawing/Gui/Command.cpp index 8695d9822..448c5b55b 100644 --- a/src/Mod/Drawing/Gui/Command.cpp +++ b/src/Mod/Drawing/Gui/Command.cpp @@ -694,6 +694,36 @@ bool CmdDrawingProjectShape::isActive(void) +//=========================================================================== +// Drawing_Draft_View +//=========================================================================== + +DEF_STD_CMD_A(CmdDrawingDraftView); + +CmdDrawingDraftView::CmdDrawingDraftView() + : Command("Drawing_DraftView") +{ + // seting the + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("&Draft View"); + sToolTipText = QT_TR_NOOP("Inserts a Draft view of the selected object(s) in the active drawing"); + sWhatsThis = "Drawing_DraftView"; + sStatusTip = QT_TR_NOOP("Inserts a Draft view of the selected object(s) in the active drawing"); + sPixmap = "actions/drawing-draft-view"; +} + +void CmdDrawingDraftView::activated(int iMsg) +{ + doCommand(Gui,"Gui.runCommand(\"Draft_Drawing\")"); +} + +bool CmdDrawingDraftView::isActive(void) +{ + return (getActiveGuiDocument() ? true : false); +} + + + void CreateDrawingCommands(void) { Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); @@ -709,4 +739,5 @@ void CreateDrawingCommands(void) rcCmdMgr.addCommand(new CmdDrawingSymbol()); rcCmdMgr.addCommand(new CmdDrawingExportPage()); rcCmdMgr.addCommand(new CmdDrawingProjectShape()); + rcCmdMgr.addCommand(new CmdDrawingDraftView()); } diff --git a/src/Mod/Drawing/Gui/Resources/Drawing.qrc b/src/Mod/Drawing/Gui/Resources/Drawing.qrc index 683575fb2..970cf5739 100644 --- a/src/Mod/Drawing/Gui/Resources/Drawing.qrc +++ b/src/Mod/Drawing/Gui/Resources/Drawing.qrc @@ -19,6 +19,7 @@ icons/actions/drawing-annotation.svg icons/actions/drawing-clip.svg icons/actions/drawing-symbol.svg + icons/actions/drawing-draft-view.svg translations/Drawing_af.qm translations/Drawing_de.qm translations/Drawing_fi.qm diff --git a/src/Mod/Drawing/Gui/Resources/icons/actions/drawing-draft-view.svg b/src/Mod/Drawing/Gui/Resources/icons/actions/drawing-draft-view.svg new file mode 100644 index 000000000..87ee3b46d --- /dev/null +++ b/src/Mod/Drawing/Gui/Resources/icons/actions/drawing-draft-view.svg @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Drawing/Gui/Workbench.cpp b/src/Mod/Drawing/Gui/Workbench.cpp index c8a88c78b..1e4e7fdec 100644 --- a/src/Mod/Drawing/Gui/Workbench.cpp +++ b/src/Mod/Drawing/Gui/Workbench.cpp @@ -65,6 +65,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const *part << "Drawing_Annotation"; *part << "Drawing_Clip"; *part << "Drawing_Symbol"; + *part << "Drawing_DraftView"; *part << "Drawing_ExportPage"; *part << "Separator"; *part << "Drawing_ProjectShape"; @@ -86,6 +87,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const *part << "Drawing_Annotation"; *part << "Drawing_Clip"; *part << "Drawing_Symbol"; + *part << "Drawing_DraftView"; *part << "Drawing_ExportPage"; return root; } @@ -105,6 +107,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const *img << "Drawing_OpenBrowserView"; *img << "Drawing_Annotation"; *img << "Drawing_Clip"; + *img << "Drawing_DraftView"; img = new Gui::ToolBarItem(root); img->setCommand("Views"); *img << "Drawing_NewView";