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