Merge pull request #4656 from chennes/draftContextMenuFallback

[Draft] Enable Transform context menu item
This commit is contained in:
Yorik van Havre
2021-03-26 11:28:36 +01:00
committed by GitHub

View File

@@ -383,13 +383,19 @@ class ViewProviderDraft(object):
Returns
-------
bool
bool or None
It is `True` if `mode` is 0, and `Draft_Edit` ran successfully.
None if mode is not zero.
It is `False` otherwise.
"""
if mode == 0 and App.GuiUp: #remove guard after splitting every viewprovider
Gui.runCommand("Draft_Edit")
return True
elif mode != 0:
# Act like this function doesn't even exist, so the command falls back to Part (e.g. in the
# case of an unrecognized context menu action)
return None
return False
def unsetEdit(self, vobj, mode=0):