0000901: Draft Edit mode
This commit is contained in:
parent
5ea7f58280
commit
7b44c7afc2
|
@ -1796,7 +1796,8 @@ class _ViewProviderDraft:
|
|||
def unsetEdit(self,vp,mode):
|
||||
if FreeCAD.activeDraftCommand:
|
||||
FreeCAD.activeDraftCommand.finish()
|
||||
return
|
||||
FreeCADGui.Control.closeDialog()
|
||||
return False
|
||||
|
||||
def getIcon(self):
|
||||
return(":/icons/Draft_Draft.svg")
|
||||
|
|
|
@ -908,6 +908,7 @@ class DraftToolBar:
|
|||
if self.cancel:
|
||||
self.cancel()
|
||||
self.cancel = None
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def escape(self):
|
||||
"escapes the current command"
|
||||
|
@ -919,6 +920,7 @@ class DraftToolBar:
|
|||
def closeLine(self):
|
||||
"close button action"
|
||||
self.sourceCmd.finish(True)
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def wipeLine(self):
|
||||
"wipes existing segments of a line"
|
||||
|
|
|
@ -3114,12 +3114,17 @@ class Edit(Modifier):
|
|||
Modifier.finish(self)
|
||||
plane.restore()
|
||||
self.running = False
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def action(self,arg):
|
||||
"scene event handler"
|
||||
if arg["Type"] == "SoKeyboardEvent":
|
||||
if arg["Key"] == "ESCAPE":
|
||||
self.finish()
|
||||
elif arg["Key"] == "f":
|
||||
self.finish()
|
||||
elif arg["Key"] == "c":
|
||||
self.finish(closed=True)
|
||||
elif arg["Type"] == "SoLocation2Event": #mouse movement detection
|
||||
if self.editing != None:
|
||||
self.point,ctrlPoint,info = getPoint(self,arg)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
height="64px"
|
||||
id="svg2726"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.1 r9760"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="Snap_Grid.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
|
@ -88,10 +88,10 @@
|
|||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="755"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2731">
|
||||
|
@ -113,13 +113,12 @@
|
|||
id="g4289"
|
||||
transform="matrix(0.1621282,0,0,0.1621282,6.3605986,-66.108806)">
|
||||
<path
|
||||
sodipodi:type="inkscape:offset"
|
||||
inkscape:radius="2.8284271"
|
||||
inkscape:original="M 12.90625 7.03125 L 12.90625 16 L 4.9375 16 L 4.9375 21.65625 L 12.90625 21.65625 L 12.90625 46 L 4.9375 46 L 4.9375 51.65625 L 12.90625 51.65625 L 12.90625 58.46875 L 18.5625 58.46875 L 18.5625 51.65625 L 40.90625 51.65625 L 40.90625 58.46875 L 46.5625 58.46875 L 46.5625 51.65625 L 56.125 51.65625 L 56.125 46 L 46.5625 46 L 46.5625 21.65625 L 56.125 21.65625 L 56.125 16 L 46.5625 16 L 46.5625 7.03125 L 40.90625 7.03125 L 40.90625 16 L 18.5625 16 L 18.5625 7.03125 L 12.90625 7.03125 z M 18.5625 21.65625 L 40.90625 21.65625 L 40.90625 46 L 18.5625 46 L 18.5625 21.65625 z "
|
||||
style="color:#000000;fill:#00b286;fill-opacity:1;fill-rule:nonzero;stroke:#002e2e;stroke-width:4.00000003;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"
|
||||
transform="matrix(6.1679584,0,0,6.1679584,-28.130145,407.75637)"
|
||||
style="color:#000000;fill:#00b286;fill-opacity:1;fill-rule:nonzero;stroke:#002e2e;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="M 12.90625,4.1875 C 11.415109,4.17955 10.05455,5.5401086 10.0625,7.03125 l 0,6.125 -5.125,0 C 3.4463586,13.1483 2.0858004,14.508859 2.09375,16 l 0,5.65625 C 2.0858,23.147391 3.4463586,24.50795 4.9375,24.5 l 5.125,0 0,18.65625 -5.125,0 C 3.4463586,43.1483 2.0858004,44.508859 2.09375,46 l 0,5.65625 C 2.0858,53.147391 3.4463586,54.50795 4.9375,54.5 l 5.125,0 0,3.96875 c -0.0079,1.491141 1.352609,2.8517 2.84375,2.84375 l 5.65625,0 c 1.491141,0.008 2.8517,-1.352609 2.84375,-2.84375 l 0,-3.96875 16.65625,0 0,3.96875 c -0.008,1.491141 1.352609,2.8517 2.84375,2.84375 l 5.65625,0 c 1.491141,0.008 2.8517,-1.352609 2.84375,-2.84375 l 0,-3.96875 6.71875,0 c 1.491141,0.008 2.8517,-1.352609 2.84375,-2.84375 l 0,-5.65625 c 0.008,-1.491141 -1.352609,-2.8517 -2.84375,-2.84375 l -6.71875,0 0,-18.65625 6.71875,0 c 1.491141,0.008 2.8517,-1.352609 2.84375,-2.84375 l 0,-5.65625 c 0.008,-1.491141 -1.352609,-2.8517 -2.84375,-2.84375 l -6.71875,0 0,-6.125 C 49.4142,5.5401086 48.053641,4.1795504 46.5625,4.1875 l -5.65625,0 C 39.415109,4.17955 38.05455,5.5401086 38.0625,7.03125 l 0,6.125 -16.65625,0 0,-6.125 C 21.4142,5.5401086 20.053641,4.1795504 18.5625,4.1875 z m 8.5,20.3125 c 0,0 5.037824,0 7.813866,0 2.776041,0 8.842384,0 8.842384,0 0,0 0.25713,5.190231 0.25713,8.299606 0,3.109375 -0.25713,10.356644 -0.25713,10.356644 0,0 -5.552083,0.128565 -8.328125,0.128565 -2.776042,0 -8.328125,-0.128565 -8.328125,-0.128565 0,0 -0.128565,-6.733009 -0.128565,-9.842384 0,-3.109375 0.128565,-8.813866 0.128565,-8.813866 z"
|
||||
id="path3775"
|
||||
d="M 12.90625,4.1875 A 2.8287099,2.8287099 0 0 0 10.0625,7.03125 l 0,6.125 -5.125,0 A 2.8287099,2.8287099 0 0 0 2.09375,16 l 0,5.65625 A 2.8287099,2.8287099 0 0 0 4.9375,24.5 l 5.125,0 0,18.65625 -5.125,0 A 2.8287099,2.8287099 0 0 0 2.09375,46 l 0,5.65625 A 2.8287099,2.8287099 0 0 0 4.9375,54.5 l 5.125,0 0,3.96875 a 2.8287099,2.8287099 0 0 0 2.84375,2.84375 l 5.65625,0 a 2.8287099,2.8287099 0 0 0 2.84375,-2.84375 l 0,-3.96875 16.65625,0 0,3.96875 a 2.8287099,2.8287099 0 0 0 2.84375,2.84375 l 5.65625,0 a 2.8287099,2.8287099 0 0 0 2.84375,-2.84375 l 0,-3.96875 6.71875,0 a 2.8287099,2.8287099 0 0 0 2.84375,-2.84375 l 0,-5.65625 A 2.8287099,2.8287099 0 0 0 56.125,43.15625 l -6.71875,0 0,-18.65625 6.71875,0 a 2.8287099,2.8287099 0 0 0 2.84375,-2.84375 l 0,-5.65625 A 2.8287099,2.8287099 0 0 0 56.125,13.15625 l -6.71875,0 0,-6.125 A 2.8287099,2.8287099 0 0 0 46.5625,4.1875 l -5.65625,0 A 2.8287099,2.8287099 0 0 0 38.0625,7.03125 l 0,6.125 -16.65625,0 0,-6.125 A 2.8287099,2.8287099 0 0 0 18.5625,4.1875 l -5.65625,0 z m 8.5,20.3125 16.65625,0 0,18.65625 -16.65625,0 0,-18.65625 z"
|
||||
transform="matrix(6.1679584,0,0,6.1679584,-28.130145,407.75637)" />
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccczczczczc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.4 KiB |
Loading…
Reference in New Issue
Block a user