Skip to content

Commit e28a69c

Browse files
authored
Merge pull request #3357 from Jack251970/fix_custom_hotkey1
Fix hotkey initialization issue
2 parents 9d1e305 + 044dc2c commit e28a69c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Flow.Launcher/HotkeyControl.xaml.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,14 @@ public HotkeyControl()
214214

215215
HotkeyList.ItemsSource = KeysToDisplay;
216216

217-
RefreshHotkeyInterface(Hotkey);
217+
// We should not call RefreshHotkeyInterface here because DependencyProperty is not set yet
218+
// And it will be called in OnHotkeyChanged event or Hotkey setter later
218219
}
219220

220221
private void RefreshHotkeyInterface(string hotkey)
221222
{
222-
SetKeysToDisplay(new HotkeyModel(Hotkey));
223-
CurrentHotkey = new HotkeyModel(Hotkey);
223+
SetKeysToDisplay(new HotkeyModel(hotkey));
224+
CurrentHotkey = new HotkeyModel(hotkey);
224225
}
225226

226227
private static bool CheckHotkeyAvailability(HotkeyModel hotkey, bool validateKeyGesture) =>

0 commit comments

Comments
 (0)