node_manager_fkie: reduced update count
@@ -557,11 +557,13 @@ class MasterViewProxy(QWidget):
'''
return self.node_tree_model.getNode("%s" % node_name, self.masteruri)
- def updateButtons(self):
+ def updateButtons(self, selected_nodes=None):
'''
Updates the enable state of the buttons depending of the selection and
running state of the selected node.
'''
+ selectedNodes = selected_nodes
+ if selectedNodes is None:
selectedNodes = self.nodesFromIndexes(self.masterTab.nodeTreeView.selectionModel().selectedIndexes())
has_running = False
has_stopped = False
@@ -1174,6 +1176,8 @@ class MasterViewProxy(QWidget):
@param index: The index of the activated node
@type index: U{QtCore.QModelIndex<https://srinikom.github.io/pyside-docs/PySide/QtCore/QModelIndex.html>}
'''
+ selectedNodes = []
+ if index.column() == 0:
selectedNodes = self.nodesFromIndexes(self.masterTab.nodeTreeView.selectionModel().selectedIndexes(), False)
if not selectedNodes:
return
@@ -1397,7 +1401,7 @@ class MasterViewProxy(QWidget):
if (self._is_current_tab_name('tabNodes') and self.__last_info_text != text) or force_emit:
self.__last_info_text = text
self.description_signal.emit(name, text, True if selected or deselected or force_emit else False)
- self.updateButtons()
+ self.updateButtons(selectedNodes)
def get_node_description(self, node_name, node=None):
text = ''
