lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 7e048d0 15/46: Remove apparently unnecessary


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 7e048d0 15/46: Remove apparently unnecessary wxEVT_CHAR handler
Date: Wed, 22 Jul 2020 11:05:11 -0400 (EDT)

branch: master
commit 7e048d007f8cd2ed0885cd6b947860f31b754e3d
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Vadim Zeitlin <vadim@tt-solutions.com>

    Remove apparently unnecessary wxEVT_CHAR handler
    
    Processing wxEVT_KEY_DOWN in DatumSequenceEditorEvtHandler seems to work
    well enough on its own, so remove the apparently unnecessary handler for
    wxEVT_CHAR.
---
 census_view.cpp | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/census_view.cpp b/census_view.cpp
index 04820ba..577f9a6 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1012,32 +1012,9 @@ class DatumSequenceEditorEvtHandler
     explicit DatumSequenceEditorEvtHandler(InputSequenceEntry* entry)
         :entry_(entry)
     {
-        Bind(wxEVT_CHAR, &DatumSequenceEditorEvtHandler::UponChar, this);
         Bind(wxEVT_KEY_DOWN, &DatumSequenceEditorEvtHandler::UponKeyDown, 
this);
     }
 
-    void UponChar(wxKeyEvent& event)
-    {
-        switch(event.GetKeyCode())
-            {
-            case WXK_RETURN:
-            case WXK_NUMPAD_ENTER:
-                if(!wxGetKeyState(WXK_ALT))
-                    {
-                    event.Skip();
-                    return;
-                    }
-
-                // Just handle, i.e. don't skip, the event to not let any other
-                // handlers process it. The editor window was already opened in
-                // UponKeyDown() handler.
-                break;
-            default:
-                event.Skip();
-                break;
-            }
-    }
-
     void UponKeyDown(wxKeyEvent& event)
     {
         switch(event.GetKeyCode())



reply via email to

[Prev in Thread] Current Thread [Next in Thread]