Difficulty in adding data in the comment section
Bug #1225927 reported by
Cyrille Delmer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Supertree Toolkit |
Confirmed
|
Medium
|
Jon Hill |
Bug Description
When data is input in comment section, one must be very carafull that one click next on a section that holds data. Otherwise, the data just added in the comment section is not saved. Not sure if its fixable
Related branches
Changed in supertree-toolkit: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Jon Hill (jon-hill) |
milestone: | none → beta |
To post a comment you must log in.
This is a bit odd. I can replicate this easily. The store function is meant to kick in and store the comment as soon as the comment block loses focus (which includes clicking on another application). I can see the function getting called, but the comment is empty when a inactive portion of the tree was the click that lost the comment box focus.
Relevant code is in commentWidget.py
def store(self):
"""
Store data in the node comment.
"""
comment_tree = self.comment_tree
print comment_tree
if comment_tree is None or not self.interacted:
print "returning"
return
data_ buffer_ bounds = self.textView. get_buffer( ).get_bounds( ) get_buffer( ).get_text( data_buffer_ bounds[ 0], data_buffer_ bounds[ 1])
new_comment = self.textView.
if new_comment != comment_tree.data:
comment_ tree.data = None
comment_ tree.active = False
comment_ tree.set_ data(new_ comment)
comment_ tree.active = True
self.emit( "on-store" )
print new_comment
if new_comment == "":
else:
return