On Thursday, December 03, 2015 13:33:48 Dirk Hohndel wrote: > > A couple of things I have found: > > 1) The profile scaling seems to get confused if I switch between portrait > > and landscape. The vertical size of the plot stays at the same scale as > > the first one drawn. > Yes - the reason is the way the pixmap gets computed. I need to figure out > how to be notified if the geometry changes (landscape/portrait rotation) > so it can be re-calculated. > > My bet is that the paint is actually called again, but because of the > asynchronous nature of all this I have moved the code that would need to > be called out of the paint function... > > I knew my fix was too easy You could try hooking up this guy http://doc.qt.io/qt-5/qquickitem.html#geometryChanged
to the second part of setDiveId(), so the geometry of the hidden profilewidget gets updated. Not sure if that helps with the race, though, but it could even be tried to force (in render(), checking if the size is still synced, and potentially calling profileWidget->setGeometry(...) first before painting. BTW, if you're looking how to get the qDebug() output visible on the Android device, run logcat on the host with the device connected: adb logcat -s Subsurface:V Cheers, -- sebas Sebastian Kügler | http://vizZzion.org | http://kde.org _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
