diff options
author | vng <viktor.govako@gmail.com> | 2013-07-10 21:44:53 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:58:37 +0300 |
commit | 4f7f6fb6bd586d7fa1d8fa9b798fc7ece4ffd4c4 (patch) | |
tree | f76718b0ec68af9b008ec84b243b2e9c53015580 /qt/draw_widget.cpp | |
parent | 116a2e8c27c89d8e3b285ad8598059bd423cc6ba (diff) |
Fix ScheduledTask tests with blocking Cancel.
Diffstat (limited to 'qt/draw_widget.cpp')
-rw-r--r-- | qt/draw_widget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 42c1260f2c..1ba822ddc0 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -336,20 +336,20 @@ namespace qt void DrawWidget::StartPressTask(m2::PointD const & pt, unsigned ms) { if (KillPressTask()) - m_scheduledTasks.reset(new ScheduledTask(bind(&DrawWidget::OnPressTaskEvent, this, pt, ms), ms)); + m_scheduledTask.reset(new ScheduledTask(bind(&DrawWidget::OnPressTaskEvent, this, pt, ms), ms)); } bool DrawWidget::KillPressTask() { - if (m_scheduledTasks) + if (m_scheduledTask) { - if (!m_scheduledTasks->Cancel()) + if (!m_scheduledTask->CancelNoBlocking()) { // The task is already running - skip new task. return false; } - m_scheduledTasks.reset(); + m_scheduledTask.reset(); } return true; } |