diff --git a/pyblish_qml/control.py b/pyblish_qml/control.py index 3b2782e0..d84fb256 100644 --- a/pyblish_qml/control.py +++ b/pyblish_qml/control.py @@ -379,7 +379,8 @@ def getPluginActions(self, index): if action["on"] == "notProcessed" and item.processed: actions.remove(action) - # Discard empty groups + # Discard empty categories, separators + remaining_actions = list() index = 0 try: action = actions[index] @@ -394,7 +395,7 @@ def getPluginActions(self, index): isempty = False - if action["__type__"] == "category": + if action["__type__"] in ("category", "separator"): try: next_ = actions[index + 1] if next_["__type__"] != "action": @@ -402,12 +403,12 @@ def getPluginActions(self, index): except IndexError: isempty = True - if isempty: - actions.pop(index) + if not isempty: + remaining_actions.append(action) index += 1 - return actions + return remaining_actions @QtCore.pyqtSlot(str) def runPluginAction(self, action): diff --git a/pyblish_qml/version.py b/pyblish_qml/version.py index 5dfb869a..fb828024 100644 --- a/pyblish_qml/version.py +++ b/pyblish_qml/version.py @@ -1,7 +1,7 @@ VERSION_MAJOR = 1 VERSION_MINOR = 8 -VERSION_PATCH = 4 +VERSION_PATCH = 5 version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH) version = '%i.%i.%i' % version_info