mirror of https://github.com/procxx/kepka.git
				
				
				
			Beta version 1.6.6: Fix animations engine.
This commit is contained in:
		
							parent
							
								
									c310cdbb8c
								
							
						
					
					
						commit
						56b6673e17
					
				|  | @ -94,7 +94,7 @@ inline bool in_range(Value &&value, From &&from, Till &&till) { | ||||||
| #define for_const(range_declaration, range_expression) for (range_declaration : std::as_const(range_expression)) | #define for_const(range_declaration, range_expression) for (range_declaration : std::as_const(range_expression)) | ||||||
| 
 | 
 | ||||||
| template <typename Lambda> | template <typename Lambda> | ||||||
| inline void InvokeQueued(QObject *context, Lambda &&lambda) { | inline void InvokeQueued(const QObject *context, Lambda &&lambda) { | ||||||
| 	QObject proxy; | 	QObject proxy; | ||||||
| 	QObject::connect(&proxy, &QObject::destroyed, context, std::forward<Lambda>(lambda), Qt::QueuedConnection); | 	QObject::connect(&proxy, &QObject::destroyed, context, std::forward<Lambda>(lambda), Qt::QueuedConnection); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -121,7 +121,7 @@ void Manager::updateQueued() { | ||||||
| 	Expects(_timerId == 0); | 	Expects(_timerId == 0); | ||||||
| 
 | 
 | ||||||
| 	_timerId = -1; | 	_timerId = -1; | ||||||
| 	crl::on_main(delayedCallGuard(), [=] { | 	InvokeQueued(delayedCallGuard(), [=] { | ||||||
| 		Expects(_timerId < 0); | 		Expects(_timerId < 0); | ||||||
| 
 | 
 | ||||||
| 		_timerId = 0; | 		_timerId = 0; | ||||||
|  | @ -142,7 +142,7 @@ void Manager::schedule() { | ||||||
| 			_forceImmediateUpdate = false; | 			_forceImmediateUpdate = false; | ||||||
| 			updateQueued(); | 			updateQueued(); | ||||||
| 		} else { | 		} else { | ||||||
| 			const auto next = _lastUpdateTime + kAnimationTimeout; | 			const auto next = _lastUpdateTime + kAnimationTick; | ||||||
| 			const auto now = crl::now(); | 			const auto now = crl::now(); | ||||||
| 			if (now < next) { | 			if (now < next) { | ||||||
| 				_timerId = startTimer(next - now, Qt::PreciseTimer); | 				_timerId = startTimer(next - now, Qt::PreciseTimer); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue