Run this code http://www.arseniy.net/files/capitalline_tab.py and click Report button two times. I see Singular matrix exception on 1.1.1. I think, that's because bbox is changed and I could not find where.
The exception disappears when you add self.canvas_frame to the CapitallineTab layout, instead of adding it to self.main_splitter.
Long story short, don't draw on a canvas that is not visible and has no height. Also don't forget to call the parent draw method when subclassing the canvas widget.
#if not self.isVisible(): return
x = [0, 1, 2, 3]
y = [1, 2, 0, 4]
self.axes.fill_between(x, 0, y, alpha=0.5)
print "draw: height %d" % self.size().height()
e = "draw: error drawing on canvas, height %d, visible %s\n"
sys.stderr.write(e % (self.size().height(), self.isVisible()))
Should there be an additional check in the Qt backend that prevents calling "draw" in such cases?
Too specific to spend time for