diff options
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -31,9 +31,11 @@ class MindMapModel(gtk.TreeStore): self._thoughts_by_id = {} self._thoughts = [] - def create_new_thought(self): - self.append(None, (self._next_thought_id, '', 0, 0, '')) + def create_new_thought(self, name='', x=0, y=0, color=''): + thought_id = self._next_thought_id + self.append(None, (thought_id, name, x, y, color)) self._next_thought_id += 1 + return thought_id def serialize(self): thoughts = [] |