Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9911308

Browse filesBrowse files
committed
Merge pull request #1025 from dopplershift/timers
2 parents b836275 + 02a7573 commit 9911308
Copy full SHA for 9911308

File tree

Expand file treeCollapse file tree

2 files changed

+9
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-4
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ def start(self, interval=None):
10421042
to reset the timer interval first if provided.
10431043
'''
10441044
if interval is not None:
1045-
self.set_interval(interval)
1045+
self._set_interval(interval)
10461046
self._timer_start()
10471047

10481048
def stop(self):

‎lib/matplotlib/backends/backend_qt4.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt4.py
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,17 @@ def __init__(self, *args, **kwargs):
9999
self._timer = QtCore.QTimer()
100100
QtCore.QObject.connect(self._timer, QtCore.SIGNAL('timeout()'),
101101
self._on_timer)
102+
self._timer_set_interval()
102103

103104
def __del__(self):
104105
# Probably not necessary in practice, but is good behavior to disconnect
105-
TimerBase.__del__(self)
106-
QtCore.QObject.disconnect(self._timer , QtCore.SIGNAL('timeout()'),
107-
self._on_timer)
106+
try:
107+
TimerBase.__del__(self)
108+
QtCore.QObject.disconnect(self._timer,
109+
QtCore.SIGNAL('timeout()'), self._on_timer)
110+
except RuntimeError:
111+
# Timer C++ object already deleted
112+
pass
108113

109114
def _timer_set_single_shot(self):
110115
self._timer.setSingleShot(self._single)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.