Gui: fix SelectionSingleton::sHasSelection
This commit is contained in:
@@ -2428,7 +2428,7 @@ PyObject *SelectionSingleton::sHasSelection(PyObject * /*self*/, PyObject *args)
|
||||
{
|
||||
const char *doc = nullptr;
|
||||
int resolve = 0;
|
||||
if (!PyArg_ParseTuple(args, "|sO!", &doc, &resolve))
|
||||
if (!PyArg_ParseTuple(args, "|si", &doc, &resolve))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
|
||||
@@ -475,6 +475,12 @@ class DocumentBasicCases(unittest.TestCase):
|
||||
self.Doc.removeObject(obj.Name)
|
||||
del obj
|
||||
|
||||
def testHasSelection(self):
|
||||
if FreeCAD.GuiUp:
|
||||
import FreeCADGui
|
||||
|
||||
self.assertFalse(FreeCADGui.Selection.hasSelection("", 1))
|
||||
|
||||
def testPropertyLink_Issue2902Part1(self):
|
||||
o1 = self.Doc.addObject("App::FeatureTest", "test1")
|
||||
o2 = self.Doc.addObject("App::FeatureTest", "test2")
|
||||
|
||||
Reference in New Issue
Block a user