Don't paint the progress indicator when it is stopped

paintEvent() drew the spinner (frozen at angle 0) even with the timer
inactive, defeating stop()'s stated intent to erase the indicator from
the view. The idle indicator sat frozen in the toolbar.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tiresiasfromthebai
2026-07-18 00:10:04 +02:00
parent 6544584949
commit 91af219d1f
+1
View File
@@ -44,6 +44,7 @@ void QProgressIndicator::paintEvent(QPaintEvent* e) {
if (!_timer->isActive()) {
_angle = 0;
_scale = 0.0f;
return; // Draw nothing when stopped. stop() expects the indicator to be erased from the view.
}
QPainter painter(this);