mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:40:05 +00:00 
			
		
		
		
	Don't stage a value if it's already the current value
This commit is contained in:
		
							parent
							
								
									289b7620a9
								
							
						
					
					
						commit
						3109344ad5
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		|  | @ -129,8 +129,15 @@ bool SettingsVariable<T>::StageValue(const T& value) | |||
| 
 | ||||
|    if (Validate(value)) | ||||
|    { | ||||
|       p->staged_ = value; | ||||
|       validated  = true; | ||||
|       if (p->value_ != value) | ||||
|       { | ||||
|          p->staged_ = value; | ||||
|       } | ||||
|       else | ||||
|       { | ||||
|          p->staged_.reset(); | ||||
|       } | ||||
|       validated = true; | ||||
|    } | ||||
| 
 | ||||
|    return validated; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat