Open marco-mariotti opened 8 years ago
Hi, I just discovered one more symptom about this. On the first drawing, if you request the sequence face boundingRect(), you will see that it has, for some reason, width=0.0
for index, item in enumerate(main_item.mapped_items): --- if not hasattr(item, 'column2faces'): print item.boundingRect() # --> this is zero for sequence face only, and only at first drawing
It appears that, on the first visualization only, something fails in the positioning of this SequenceFace. The faces in the columns after the column of the SequenceFace are drawn with the same x as the SequenceFace, as if the initial width computed for the SequenceFace is 0. At any second draw (for example pushing the "<-> x " button), this is fixed.
Code to test this:
from ete3 import *; tree=Tree(); tree.populate(5); [ [n.add_face( faces.TextFace('first'), 1, 'aligned' ), n.add_face( faces.TextFace('second'), 2, 'aligned' ), n.add_face( faces.SequenceFace( upper('AMIN-S'), seqtype='aa' ) , 3, 'aligned'), n.add_face( faces.TextFace('third'), 4, 'aligned' ), n.add_face( faces.TextFace('fourth'), 5, 'aligned' )] for n in tree ]; tree.show()