Fix UI labels and unit type to be angle instead of length when doing draft rotate
This commit is contained in:
committed by
Yorik van Havre
parent
a8c56deca8
commit
bfae0408ac
@@ -1097,6 +1097,13 @@ class DraftToolBar:
|
||||
self.labelx.setText(translate("draft", "Center X"))
|
||||
self.continueCmd.show()
|
||||
|
||||
def rotateSetCenterUi(self):
|
||||
self.pointUi(translate("draft", "Arc"),icon="Draft_Rotate")
|
||||
self.labelx.setText(translate("draft", "Center X"))
|
||||
self.labely.setText(translate("draft", "Center Y"))
|
||||
self.labelz.setText(translate("draft", "Center Z"))
|
||||
self.continueCmd.show()
|
||||
|
||||
def pointUi(self,title=translate("draft","Point"),cancel=None,extra=None,getcoords=None,rel=False,icon="Draft_Draft"):
|
||||
if cancel: self.cancel = cancel
|
||||
if getcoords: self.pointcallback = getcoords
|
||||
|
||||
@@ -2817,7 +2817,7 @@ class Rotate(Modifier):
|
||||
self.selected_subelements = FreeCADGui.Selection.getSelectionEx()
|
||||
self.step = 0
|
||||
self.center = None
|
||||
self.ui.arcUi()
|
||||
self.ui.rotateSetCenterUi()
|
||||
self.ui.modUi()
|
||||
self.ui.setTitle(translate("draft","Rotate"))
|
||||
self.arctrack = arcTracker()
|
||||
@@ -3036,6 +3036,7 @@ class Rotate(Modifier):
|
||||
self.ui.hasFill.hide()
|
||||
self.ui.labelRadius.setText(translate("draft","Base angle"))
|
||||
self.ui.radiusValue.setToolTip(translate("draft","The base angle you wish to start the rotation from"))
|
||||
self.ui.radiusValue.setText(FreeCAD.Units.Quantity(0,FreeCAD.Units.Angle).UserString)
|
||||
self.step = 1
|
||||
FreeCAD.Console.PrintMessage(translate("draft", "Pick base angle")+"\n")
|
||||
|
||||
@@ -3044,6 +3045,7 @@ class Rotate(Modifier):
|
||||
if (self.step == 1):
|
||||
self.ui.labelRadius.setText(translate("draft","Rotation"))
|
||||
self.ui.radiusValue.setToolTip(translate("draft","The amount of rotation you wish to perform. The final angle will be the base angle plus this amount."))
|
||||
self.ui.radiusValue.setText(FreeCAD.Units.Quantity(0,FreeCAD.Units.Angle).UserString)
|
||||
self.firstangle = math.radians(rad)
|
||||
self.arctrack.setStartAngle(self.firstangle)
|
||||
self.arctrack.on()
|
||||
|
||||
Reference in New Issue
Block a user