Don't activate default button on Enter in multiline wxTextCtrl

Restore behaviour until c43e0fa123 and let
Enter presses in multiline text controls perform their default function
in the control instead of closing the dialog.

Make the unit test more discerning to check for this.
This commit is contained in:
Vadim Zeitlin
2019-09-08 22:05:58 +02:00
parent 84f29ce472
commit 9bab9d8da8
2 changed files with 7 additions and 5 deletions

View File

@@ -2216,7 +2216,7 @@ wxTextCtrl::MSWHandleMessage(WXLRESULT *rc,
// Fix these problems by explicitly performing the default function of this
// key (which would be done by MSWProcessMessage() if we didn't have
// wxTE_PROCESS_ENTER) and preventing the default WndProc from getting it.
if ( !processed && wParam == VK_RETURN )
if ( !processed && wParam == VK_RETURN && IsSingleLine() )
{
if ( ClickDefaultButtonIfPossible() )
processed = true;