From a345669b382fafecc2e58a305318101a215be26c Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Tue, 6 Nov 2018 17:13:18 +0800 Subject: [PATCH] Path.Area: fix default parameter initialization --- src/Mod/Path/App/AreaPyImp.cpp | 3 +++ src/Mod/Path/InitGui.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/App/AreaPyImp.cpp b/src/Mod/Path/App/AreaPyImp.cpp index 23361c7932..af142bb547 100644 --- a/src/Mod/Path/App/AreaPyImp.cpp +++ b/src/Mod/Path/App/AreaPyImp.cpp @@ -46,6 +46,9 @@ static PyObject * areaSetParams(PyObject *, PyObject *args, PyObject *kwd) { static char *kwlist[] = {PARAM_FIELD_STRINGS(NAME,AREA_PARAMS_STATIC_CONF),NULL}; + if(args && PySequence_Size(args)>0) + PyErr_SetString(PyExc_ValueError,"Non-keyword argument is not supported"); + //Declare variables defined in the NAME field of the CONF parameter list PARAM_PY_DECLARE(PARAM_FNAME,AREA_PARAMS_STATIC_CONF); diff --git a/src/Mod/Path/InitGui.py b/src/Mod/Path/InitGui.py index c7dedf1e7f..9551c10938 100644 --- a/src/Mod/Path/InitGui.py +++ b/src/Mod/Path/InitGui.py @@ -123,7 +123,7 @@ class PathWorkbench (Workbench): curveAccuracy = PathPreferences.defaultLibAreaCurveAccuracy() if curveAccuracy: - Path.Area.setDefaultParams(curveAccuracy) + Path.Area.setDefaultParams(Accuracy = curveAccuracy) Log('Loading Path workbench... done\n')