mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Force unfocusing of all input fields when saving a preset, otherwise the currently focused one might be ignored. #750 #624
This commit is contained in:
		
							parent
							
								
									c793a2657f
								
							
						
					
					
						commit
						28b56ae840
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -85,6 +85,12 @@ sub new {
 | 
			
		|||
    });
 | 
			
		||||
    
 | 
			
		||||
    EVT_BUTTON($self, $self->{btn_save_preset}, sub {
 | 
			
		||||
        
 | 
			
		||||
        # since buttons (and choices too) don't get focus on Mac, we set focus manually
 | 
			
		||||
        # to the treectrl so that the EVT_* events are fired for the input field having
 | 
			
		||||
        # focus currently. is there anything better than this?
 | 
			
		||||
        $self->{treectrl}->SetFocus;
 | 
			
		||||
        
 | 
			
		||||
        my $preset = $self->current_preset;
 | 
			
		||||
        my $default_name = $preset->{default} ? 'Untitled' : basename($preset->{name});
 | 
			
		||||
        $default_name =~ s/\.ini$//i;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue