From ecece6668101f2edf8e5967fafabb4857709128d Mon Sep 17 00:00:00 2001 From: rachytski Date: Sat, 10 Mar 2012 14:33:20 +0400 Subject: [PATCH] using QtVideoTimer to call DrawFrame on the GUI thread. closes #717 --- qt/draw_widget.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index a07e11ab70..771618beed 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -184,11 +184,14 @@ namespace qt VideoTimer * DrawWidget::CreateVideoTimer() { -#ifdef OMIM_OS_MAC - return CreateAppleVideoTimer(bind(&DrawWidget::DrawFrame, this)); -#else +//#ifdef OMIM_OS_MAC +// return CreateAppleVideoTimer(bind(&DrawWidget::DrawFrame, this)); +//#else + /// Using timer, which doesn't use the separate thread + /// for performing an action. This avoids race conditions in Framework. + /// see issue #717 return new QtVideoTimer(this, bind(&DrawWidget::DrawFrame, this)); -#endif +//#endif } void DrawWidget::ScaleChanged(int action)