History

don't reset the idleTimer if the interval hasn't changed

Stephen Birarda committed 11 years ago

Commit 7cee5f31 parent db5e8c71 file · +4 −1Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+4−1
@@ -1837,8 +1837,11 @@ void Application::idle() { · 1836 unmodified lines
18371837 // perpetuity and not expect events to get backed up.
18381838
18391839 static const int IDLE_TIMER_DELAY_MS = 0;
1840+ int desiredInterval = _glWidget->isThrottleRendering() ? THROTTLED_IDLE_TIMER_DELAY : IDLE_TIMER_DELAY_MS;
18401841
1841− idleTimer->start(_glWidget->isThrottleRendering() ? THROTTLED_IDLE_TIMER_DELAY : IDLE_TIMER_DELAY_MS);
1842+ if (idleTimer->interval() != desiredInterval) {
1843+ idleTimer->start(desiredInterval);
1844+ }
18421845 }
18431846
18441847 // check for any requested background downloads.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t