Closed fpalazzolo closed 1 year ago
I'm sorry, that last bit of code was incorrect. A working addition is here...
in jkqtplotter.cpp, at the bottom of resizeEvent(), change:
if (sizeChanged) {
resizeTimer.setSingleShot(true);
resizeTimer.start(jkqtp_RESIZE_DELAY);
}
to
if (sizeChanged) {
if (jkqtp_RESIZE_DELAY == 0) {
// Do this now
delayedResizeEvent();
} else {
resizeTimer.setSingleShot(true);
resizeTimer.start(jkqtp_RESIZE_DELAY);
}
}
Hi! that sounds like a good idea ... and I would be happy to receive a PR ... Could you also explain this in the documentation of jkqtp_RESIZE_DELAY? Thanks, JAN
The delayed resize event might help with large datasets, but it makes the plot jump around. Setting the delay to zero doesn't make this go away either, because the timer mechanism is still enabled.
For my use case, I would like the resizing to be smooth. I propose the following change, which just bypasses the resize timer if the value is set to 0:
in jkqtplotter.cpp:
I can create a pull request if needed/desired