File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ public Form1()
4242 UpdateMouseSensitivityButton ( ) ;
4343 UpdateIsMouseRunning ( ) ;
4444 InitBackgroundWorker ( ) ;
45- InitMapString ( ) ;
4645 InitPresetButtons ( ) ;
4746 UpdateMapStringBox ( ) ;
4847 }
@@ -55,6 +54,10 @@ private void InitPresetButtons()
5554 this . flwPresetButtons . Controls . Add ( pr . ButtonForPresetSection ) ;
5655 pr . ButtonForPresetSection . Click += ButtonForPresetSection_Click ;
5756 }
57+ //adding keymaps for button to mapper
58+ mapper . ClearKeyMaps ( ) ;
59+ mapper . AddKeymaps ( presets [ 0 ] . Keymaps ) ;
60+ //activating first button in the list
5861 if ( this . flwPresetButtons . Controls [ 0 ] is Button btn )
5962 {
6063 KeymapPresetOperations . ChangeButtonTextForSelected ( btn , true ) ;
@@ -64,11 +67,6 @@ private void InitBackgroundWorker()
6467 {
6568 bgWorkThread . RunWorkerAsync ( SynchronizationContext . Current ) ;
6669 }
67- private void InitMapString ( )
68- {
69- var ret = KeymapPresetOperations . BuildPresetBrowsing ( ) ;
70- mapper . AddKeymaps ( ret ) ;
71- }
7270 private void UpdateMouseSensitivityTrackbar ( )
7371 {
7472 trackBar1 . Value = mapper . GetMouseSensitivity ( ) ;
You can’t perform that action at this time.
0 commit comments