[Marble-bugs] [Bug 254000] MarbleWidget and Slider for the zoom causes the application to use 100% CPU.
Dennis Nienhüser
earthwings at gentoo.org
Wed Oct 13 20:50:51 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=254000
--- Comment #5 from Dennis Nienhüser <earthwings gentoo org> 2010-10-13 20:50:50 ---
The implementation of our own slider has some interesting notes on this btw.
Also notice the blockSignals() calls.
// There exists a circular signal/slot connection between MarbleWidget and
this widget's
// zoom slider. MarbleWidget prevents recursion, but it still loops one
time unless
// blocked here. Note that it would be possible to only connect the sliders
// sliderMoved signal instead of its valueChanged signal above to break up
the loop.
// This however means that the slider cannot be operated with the mouse
wheel, as this
// does not emit the sliderMoved signal for some reason. Therefore the
signal is blocked
// below before calling setValue on the slider to avoid that it calls back
to MarbleWidget,
// and then un-blocked again to make user interaction possible.
d->m_navigationUi.zoomSlider->blockSignals( true );
d->m_navigationUi.zoomSlider->setValue( zoom );
d->m_navigationUi.zoomSlider->setMinimum( minimumZoom() );
// As we have disabled all zoomSlider Signals, we have to update our
buttons seperately.
updateButtons( zoom );
d->m_navigationUi.zoomSlider->blockSignals( false );
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Marble-bugs
mailing list