Tried to fix animation bug when mouse drag is really fast.
This commit is contained in:
		
							parent
							
								
									cd4654dfd2
								
							
						
					
					
						commit
						15698fd6f0
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -293,7 +293,10 @@ ChartWidget::ChartWidget(not_null<Ui::RpWidget*> parent)
 | 
			
		|||
			&& AnimFinished(_xPercentage.animValueYMax);
 | 
			
		||||
		const auto alphaFinished = AnimFinished(_xPercentage.animValueYAlpha);
 | 
			
		||||
		if (xFinished && yFinished && alphaFinished) {
 | 
			
		||||
			if ((_horizontalLines.back().lines.front().absoluteValue == _xPercentage.animValueYMin.to())
 | 
			
		||||
				&& (_horizontalLines.back().lines.back().absoluteValue == _xPercentage.animValueYMax.to())) {
 | 
			
		||||
				_xPercentage.animation.stop();
 | 
			
		||||
			}
 | 
			
		||||
			_xPercentage.alphaAnimationStartedAt = 0;
 | 
			
		||||
			_xPercentage.yAnimationStartedAt = 0;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue