mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Use more generic EVT_KEY_DOWN().
This commit is contained in:
		
							parent
							
								
									4bee713579
								
							
						
					
					
						commit
						0b0e531661
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		|  | @ -6,7 +6,7 @@ use utf8; | |||
| use File::Basename qw(basename); | ||||
| use List::Util qw(first); | ||||
| use Wx qw(:bookctrl :dialog :keycode :icon :id :misc :panel :sizer :treectrl :window); | ||||
| use Wx::Event qw(EVT_BUTTON EVT_CHOICE EVT_TREE_SEL_CHANGED EVT_TREE_KEY_DOWN); | ||||
| use Wx::Event qw(EVT_BUTTON EVT_CHOICE EVT_KEY_DOWN EVT_TREE_SEL_CHANGED); | ||||
| use base 'Wx::Panel'; | ||||
| 
 | ||||
| sub new { | ||||
|  | @ -74,12 +74,10 @@ sub new { | |||
|         $self->{sizer}->Layout; | ||||
|         $self->Refresh; | ||||
|     }); | ||||
|     EVT_TREE_KEY_DOWN($self->{treectrl}, $self->{treectrl}, sub { | ||||
|     EVT_KEY_DOWN($self->{treectrl}, sub { | ||||
|         my ($treectrl, $event) = @_; | ||||
|         # TODO: Once https://rt.cpan.org/Public/Bug/Display.html?id=78550 is fixed, | ||||
|         # add proper checks for Shift+Tab etc. | ||||
|         if ($event->GetKeyCode == WXK_TAB) { | ||||
|             $treectrl->Navigate(&Wx::wxNavigateForward); | ||||
|             $treectrl->Navigate($event->ShiftDown ? &Wx::wxNavigateBackward : &Wx::wxNavigateForward); | ||||
|         } else { | ||||
|             $event->Skip; | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Henrik Brix Andersen
						Henrik Brix Andersen