diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp
index d1488d4e5..49a3738a4 100644
--- a/src/Mod/PartDesign/Gui/Workbench.cpp
+++ b/src/Mod/PartDesign/Gui/Workbench.cpp
@@ -173,6 +173,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Sketcher_CreateLine"
<< "Sketcher_CreatePolyline"
<< "Sketcher_CreateRectangle"
+ << "Sketcher_CreateSlot"
<< "Separator"
<< "Sketcher_CreateFillet"
<< "Sketcher_Trimming"
@@ -266,6 +267,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "Sketcher_CreateLine"
<< "Sketcher_CreatePolyline"
<< "Sketcher_CreateRectangle"
+ << "Sketcher_CreateSlot"
<< "Separator"
<< "Sketcher_CreateFillet"
<< "Sketcher_Trimming"
diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
index b53527f23..4f71d127b 100644
--- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
+++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
@@ -3076,7 +3076,7 @@ CmdSketcherCreateSlot::CmdSketcherCreateSlot()
sWhatsThis = sToolTipText;
sStatusTip = sToolTipText;
sPixmap = "Sketcher_CreateSlot";
- sAccel = "R";
+ sAccel = "";
eType = ForEdit;
}
@@ -3104,10 +3104,10 @@ void CreateSketcherCommandsCreateGeo(void)
rcCmdMgr.addCommand(new CmdSketcherCreateLine());
rcCmdMgr.addCommand(new CmdSketcherCreatePolyline());
rcCmdMgr.addCommand(new CmdSketcherCreateRectangle());
+ rcCmdMgr.addCommand(new CmdSketcherCreateSlot());
rcCmdMgr.addCommand(new CmdSketcherCreateFillet());
//rcCmdMgr.addCommand(new CmdSketcherCreateText());
//rcCmdMgr.addCommand(new CmdSketcherCreateDraftLine());
rcCmdMgr.addCommand(new CmdSketcherTrimming());
rcCmdMgr.addCommand(new CmdSketcherExternal());
- rcCmdMgr.addCommand(new CmdSketcherCreateSlot());
}
diff --git a/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_CreateSlot.svg b/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_CreateSlot.svg
index 9a25a5e56..6a0c985b3 100644
--- a/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_CreateSlot.svg
+++ b/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_CreateSlot.svg
@@ -10,20 +10,18 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="64px"
- height="64px"
- id="svg2825"
- sodipodi:version="0.32"
- inkscape:version="0.48.1 r9760"
- sodipodi:docname="Sketcher_CreateRectangle.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- version="1.1">
+ width="64"
+ height="64"
+ id="svg4564"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="Sketcher_CreateSlot.svg">
+ id="defs4566">
+ id="linearGradient3144-3">
+ id="stop3146-7" />
+ id="stop3148-0" />
-
+
+
+
+
+ id="metadata4569">
image/svg+xml
+
+ transform="translate(0,-988.36218)">
-
-
+ id="g3864">
+ transform="translate(-82.839357,-9.4600504)"
+ id="g3858">
+
+
+
+
-
+ transform="matrix(-0.14592237,0.00572413,-0.00572413,-0.14592237,138.19924,1128.1503)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id="g3185-6"
+ transform="matrix(-0.14592237,0.00572413,-0.00572413,-0.14592237,53.810078,1114.8202)"
+ inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/circle.png"
+ inkscape:export-xdpi="7.2934141"
+ inkscape:export-ydpi="7.2934141">
+ sodipodi:rx="48.57143"
+ sodipodi:cy="655.2193"
+ sodipodi:cx="197.14285"
+ id="path3187-4"
+ style="fill:#ff2000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5.79999971;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ sodipodi:ry="23.991123"
+ sodipodi:rx="34.345188"
+ sodipodi:cy="672.79736"
+ sodipodi:cx="225.26402"
+ id="path3189-2"
+ style="fill:url(#radialGradient4572);fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+
+
+
+
diff --git a/src/Mod/Sketcher/Gui/Workbench.cpp b/src/Mod/Sketcher/Gui/Workbench.cpp
index 2147903e2..08f8dab32 100644
--- a/src/Mod/Sketcher/Gui/Workbench.cpp
+++ b/src/Mod/Sketcher/Gui/Workbench.cpp
@@ -60,7 +60,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
root->insertItem(item, profile);
profile->setCommand("P&rofiles");
- *profile << "Sketcher_ProfilesHexagon1";
+ *profile << "Sketcher_ProfilesHexagon1";
// == Sketcher menu ==========================================
@@ -78,7 +78,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Separator"
<< "Sketcher_CreatePolyline"
<< "Sketcher_CreateRectangle"
- << "Sketcher_CreateSlot"
+ << "Sketcher_CreateSlot"
<< "Separator"
<< "Sketcher_CreateFillet"
<< "Sketcher_Trimming"
diff --git a/src/Mod/Sketcher/ProfileLib/Hexagon.py b/src/Mod/Sketcher/ProfileLib/Hexagon.py
index fb268deda..268668741 100644
--- a/src/Mod/Sketcher/ProfileLib/Hexagon.py
+++ b/src/Mod/Sketcher/ProfileLib/Hexagon.py
@@ -27,7 +27,7 @@ __title__="Hexagon profile lib"
__author__ = "Juergen Riegel"
__url__ = "http://www.freecadweb.org"
-
+
def makeHexagonSimple():
return
diff --git a/src/Mod/Sketcher/Profiles.py b/src/Mod/Sketcher/Profiles.py
index fb469ad00..d9dfd7695 100644
--- a/src/Mod/Sketcher/Profiles.py
+++ b/src/Mod/Sketcher/Profiles.py
@@ -33,15 +33,15 @@ __title__="Sketcher profile lib handling"
__author__ = "Juergen Riegel"
__url__ = "http://www.freecadweb.org"
-
+
def isProfileActive():
- return True
+ return not FreeCAD.ActiveDocument is None
class _CommandProfileHexagon1:
"The basis hexagon profile command definition"
def GetResources(self):
return {'Pixmap' : 'Sketcher_Hexagon',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagon profile in the sketch"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagon profile"),
'Accel': "",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagon profile in the sketch")}
@@ -50,10 +50,9 @@ class _CommandProfileHexagon1:
FreeCAD.ActiveDocument.openTransaction("Create hexagon profile")
FreeCADGui.addModule("ProfileLib.Hexagon")
FreeCADGui.doCommand("ProfileLib.Hexagon.makeHexagonSimple()")
-
+
def IsActive(self):
return isProfileActive()
-
FreeCADGui.addCommand('Sketcher_ProfilesHexagon1',_CommandProfileHexagon1())