]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Don't set value unnecessarily in wxSpinCtrl::Create() in wxMSW.
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index cb0d915f8b3f4c3fa01935c0cc5ce94a6f518f0c..e8eff5d801319effc3b75cdf8b88d1d72a0a38ad 100644 (file)
@@ -1176,7 +1176,8 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
 
             ScrollIntoView(m_caretPosition, WXK_LEFT);
 
-            if (deletions > 0)
+            // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion.
+            //if (deletions > 0)
             {
                 wxRichTextEvent cmdEvent(
                     wxEVT_COMMAND_RICHTEXT_DELETE,
@@ -1314,7 +1315,8 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
 
         ScrollIntoView(m_caretPosition, WXK_LEFT);
 
-        if (deletions > 0)
+        // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion.
+        //if (deletions > 0)
         {
             wxRichTextEvent cmdEvent(
                 wxEVT_COMMAND_RICHTEXT_DELETE,
@@ -1387,7 +1389,8 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
 
         ScrollIntoView(m_caretPosition, WXK_LEFT);
 
-        if (deletions > 0)
+        // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion.
+        //if (deletions > 0)
         {
             wxRichTextEvent cmdEvent(
                 wxEVT_COMMAND_RICHTEXT_DELETE,