Arch: Fixed toolbar mode - fixes #1473
This commit is contained in:
parent
ebb921d60a
commit
e429b31acb
|
@ -481,6 +481,7 @@ class _CommandStructure:
|
||||||
|
|
||||||
def update(self,point,info):
|
def update(self,point,info):
|
||||||
"this function is called by the Snapper when the mouse is moved"
|
"this function is called by the Snapper when the mouse is moved"
|
||||||
|
if FreeCADGui.Control.activeDialog():
|
||||||
if self.Height >= self.Length:
|
if self.Height >= self.Length:
|
||||||
delta = Vector(0,0,self.Height/2)
|
delta = Vector(0,0,self.Height/2)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -246,6 +246,7 @@ class _CommandWall:
|
||||||
|
|
||||||
def update(self,point,info):
|
def update(self,point,info):
|
||||||
"this function is called by the Snapper when the mouse is moved"
|
"this function is called by the Snapper when the mouse is moved"
|
||||||
|
if FreeCADGui.Control.activeDialog():
|
||||||
b = self.points[0]
|
b = self.points[0]
|
||||||
n = FreeCAD.DraftWorkingPlane.axis
|
n = FreeCAD.DraftWorkingPlane.axis
|
||||||
bv = point.sub(b)
|
bv = point.sub(b)
|
||||||
|
|
|
@ -561,6 +561,12 @@ class DraftToolBar:
|
||||||
# create a dummy task to block the UI during the works
|
# create a dummy task to block the UI during the works
|
||||||
class dummy:
|
class dummy:
|
||||||
"an empty dialog"
|
"an empty dialog"
|
||||||
|
def __init__(self,extra=None):
|
||||||
|
if extra:
|
||||||
|
if isinstance(extra,list):
|
||||||
|
self.form = extra
|
||||||
|
else:
|
||||||
|
self.form = [extra]
|
||||||
def getStandardButtons(self):
|
def getStandardButtons(self):
|
||||||
return int(QtGui.QDialogButtonBox.Cancel)
|
return int(QtGui.QDialogButtonBox.Cancel)
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
@ -571,8 +577,9 @@ class DraftToolBar:
|
||||||
FreeCADGui.draftToolBar.escape()
|
FreeCADGui.draftToolBar.escape()
|
||||||
FreeCADGui.ActiveDocument.resetEdit()
|
FreeCADGui.ActiveDocument.resetEdit()
|
||||||
return True
|
return True
|
||||||
if not FreeCADGui.Control.activeDialog():
|
if FreeCADGui.Control.activeDialog():
|
||||||
todo.delay(FreeCADGui.Control.showDialog,dummy())
|
FreeCADGui.Control.closeDialog()
|
||||||
|
todo.delay(FreeCADGui.Control.showDialog,dummy(extra))
|
||||||
self.setTitle(title)
|
self.setTitle(title)
|
||||||
|
|
||||||
def redraw(self):
|
def redraw(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user