mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fix in upgrade_text_entry_dialog()
This commit is contained in:
		
							parent
							
								
									6d00ed9e2f
								
							
						
					
					
						commit
						691cdeb88c
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -1804,13 +1804,12 @@ static void upgrade_text_entry_dialog(wxTextEntryDialog* dlg, double min = -1.0, | |||
|     btn_OK->Bind(wxEVT_UPDATE_UI, [textctrl, min, max](wxUpdateUIEvent& evt) | ||||
|     { | ||||
|         bool disable = textctrl->IsEmpty(); | ||||
|         if (!disable && min >= 0.0 && max >= 0.0) | ||||
|         { | ||||
|         if (!disable && min >= 0.0 && max >= 0.0) { | ||||
|             double value = -1.0; | ||||
|             if (!textctrl->GetValue().ToCDouble(&value))    // input value couldn't be converted to double
 | ||||
|                 disable = true; | ||||
|             else | ||||
|                 disable = value < min || value > max;       // is input value is out of valid range ?
 | ||||
|                 disable = value < min - epsilon() || value > max + epsilon();       // is input value is out of valid range ?
 | ||||
|         } | ||||
| 
 | ||||
|         evt.Enable(!disable); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966