Skip to content

Commit

Permalink
Draft: fixed buggy global copy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Nov 30, 2015
1 parent c78f57a commit a557cd4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Mod/Draft/DraftGui.py
Expand Up @@ -512,7 +512,8 @@ def setupToolBar(self,task=False):
QtCore.QObject.connect(self.xyButton,QtCore.SIGNAL("clicked()"),self.selectXY)
QtCore.QObject.connect(self.xzButton,QtCore.SIGNAL("clicked()"),self.selectXZ)
QtCore.QObject.connect(self.yzButton,QtCore.SIGNAL("clicked()"),self.selectYZ)
QtCore.QObject.connect(self.continueCmd,QtCore.SIGNAL("stateChanged(int)"),self.setContinue)
QtCore.QObject.connect(self.continueCmd,QtCore.SIGNAL("stateChanged(int)"),self.setContinue)
QtCore.QObject.connect(self.isCopy,QtCore.SIGNAL("stateChanged(int)"),self.setCopymode)
QtCore.QObject.connect(self.isRelative,QtCore.SIGNAL("stateChanged(int)"),self.setRelative)
QtCore.QObject.connect(self.hasFill,QtCore.SIGNAL("stateChanged(int)"),self.setFill)
QtCore.QObject.connect(self.currentViewButton,QtCore.SIGNAL("clicked()"),self.selectCurrentView)
Expand Down Expand Up @@ -1006,6 +1007,9 @@ def extUi(self):

def modUi(self):
self.isCopy.show()
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
if p.GetBool("copymode",True):
self.isCopy.setChecked(p.GetBool("copymodeValue",False))
self.continueCmd.show()

def vertUi(self,addmode=True):
Expand Down Expand Up @@ -1056,6 +1060,10 @@ def setRelative(self,val=1):
self.relativeMode = bool(val)
if (not self.taskmode) or self.isTaskOn:
self.isRelative.show()

def setCopymode(self,val=0):
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
p.SetBool("copymodeValue",bool(val))

def relocate(self):
"relocates the right-aligned buttons depending on the toolbar size"
Expand Down

0 comments on commit a557cd4

Please sign in to comment.