From e22b52e6655f2356ee90bd5034db4885cdbe2c3f Mon Sep 17 00:00:00 2001 From: BDisp Date: Mon, 19 Jul 2021 18:39:43 +0100 Subject: [PATCH] Fixes HasFlag behavior by using == keyword. --- UICatalog/Scenarios/Editor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UICatalog/Scenarios/Editor.cs b/UICatalog/Scenarios/Editor.cs index ae32eaf19..0ba5d4de0 100644 --- a/UICatalog/Scenarios/Editor.cs +++ b/UICatalog/Scenarios/Editor.cs @@ -137,9 +137,9 @@ namespace UICatalog { Win.KeyPress += (e) => { if (winDialog != null && (e.KeyEvent.Key == Key.Esc - || e.KeyEvent.Key.HasFlag (Key.Q | Key.CtrlMask))) { + || e.KeyEvent.Key == (Key.Q | Key.CtrlMask))) { DisposeWinDialog (); - } else if (e.KeyEvent.Key.HasFlag (Key.Q | Key.CtrlMask)) { + } else if (e.KeyEvent.Key == (Key.Q | Key.CtrlMask)) { Quit (); e.Handled = true; }