diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-21 16:58:13 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-21 16:58:13 +0200 |
commit | 9eb63855007af614ae2314b1c02e12c067517842 (patch) | |
tree | 6548db6ff0f64744fe9260efa1b436156a2e1c9e | |
parent | 466f49ac5702c02352617481f0beaeef7ddc604b (diff) |
clean up right click in tests/path
-rw-r--r-- | editor/tests/path.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/editor/tests/path.cpp b/editor/tests/path.cpp index 7e79c46c..0a81dd62 100644 --- a/editor/tests/path.cpp +++ b/editor/tests/path.cpp @@ -39,15 +39,22 @@ bool path_test::handle_mouse_click(app& a, const mouse_button_event& e, bool is_ } return true; } - case mouse_button_right: - if (has_pending || has_result) + case mouse_button_right: { + bool ret = false; + if (has_pending) { - has_pending = has_result = false; + has_pending = false; pending = {}; + ret = true; + } + if (has_result) + { + has_result = false; result = {}; - return true; + ret = true; } - return false; + return ret; + } default: return false; } |