[Draft] Further cleanup of the branch

thanks to vocx revisions
This commit is contained in:
carlopav
2020-04-19 17:47:59 +02:00
committed by Yorik van Havre
parent e68bf521f6
commit 854687fd6f
3 changed files with 20 additions and 15 deletions

View File

@@ -29,10 +29,13 @@ This module provide the code for the Draft Statusbar, activated by initGui
# \ingroup DRAFT
# \brief This module provides the code for the Draft Statusbar.
from PySide import QtCore
from PySide import QtGui
from PySide.QtCore import QT_TRANSLATE_NOOP
import FreeCAD as App
import FreeCADGui as Gui
from PySide import QtCore, QtGui
from PySide.QtCore import QT_TRANSLATE_NOOP
from draftutils.init_tools import get_draft_snap_commands
#----------------------------------------------------------------------------
@@ -148,7 +151,8 @@ def _set_scale(action):
if custom_scale[1]:
print(custom_scale[0])
scale = label_to_scale(custom_scale[0])
if scale is None: return
if scale is None:
return
param.SetFloat("DraftAnnotationScale", scale)
cs = scale_to_label(scale)
scale_widget.scaleLabel.setText(cs)

View File

@@ -115,13 +115,13 @@ def get_draft_utility_commands():
def get_draft_snap_commands():
"""Return the snapping commands list."""
return ['Draft_Snap_Lock',
'Draft_Snap_Endpoint', 'Draft_Snap_Midpoint',
'Draft_Snap_Center', 'Draft_Snap_Angle',
return ['Draft_Snap_Lock',
'Draft_Snap_Endpoint', 'Draft_Snap_Midpoint',
'Draft_Snap_Center', 'Draft_Snap_Angle',
'Draft_Snap_Intersection', 'Draft_Snap_Perpendicular',
'Draft_Snap_Extension', 'Draft_Snap_Parallel',
'Draft_Snap_Special', 'Draft_Snap_Near',
'Draft_Snap_Ortho', 'Draft_Snap_Grid',
'Draft_Snap_Extension', 'Draft_Snap_Parallel',
'Draft_Snap_Special', 'Draft_Snap_Near',
'Draft_Snap_Ortho', 'Draft_Snap_Grid',
'Draft_Snap_WorkingPlane', 'Draft_Snap_Dimensions',
]