Commit 020ecda6 authored by Damien Naudet's avatar Damien Naudet

Fixed a bug in the Node.

parent 260d06f1
......@@ -89,6 +89,7 @@ class Node(object):
groupClasses = []
deletable = False
dragEnabledColumns = [None, None]
columnCount = ModelColumns.ColumnMax
# TODO : count visible references to unload data that isn't
# displayed anymore
......@@ -120,8 +121,6 @@ class Node(object):
self.__connected = False
self.__model = None
self.__data = []
self.__loaded = False
editors = kwargs.get('editors', None)
......@@ -181,6 +180,7 @@ class Node(object):
if self.editableColumns is None:
self.editableColumns = False
self.__data = []
self._setModel(model)
self.nodeName = nodeName
......@@ -193,9 +193,9 @@ class Node(object):
def _setModel(self, model):
if model:
self.__model = weakref.ref(model)
columnCount = model.columnCount()
columnCount = max(model.columnCount(), self.columnCount)
else:
columnCount = ModelColumns.ColumnMax
columnCount = self.columnCount
self.__model = None
currentCount = len(self.__data)
......
......@@ -192,7 +192,6 @@ class ProgressSubject(Qt.QObject):
class ProgressGroup(Node):
nodeName = 'Intensity'
editors = [ProgressBarEditor]
def subjectSignals(self, column):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment