fixed wxTextCtrl to not process clipboard events twice if there's a custom wxEVT_COMMAND_TEXT_* handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,7 +127,9 @@ wxMSW:
|
|||||||
- Fix setting icons when they have non-default (16*16 and 32*32) sizes.
|
- Fix setting icons when they have non-default (16*16 and 32*32) sizes.
|
||||||
- Fixed wxLocale::GetInfo to use the C locale.
|
- Fixed wxLocale::GetInfo to use the C locale.
|
||||||
- Don't enable disabled windows when showing them (Harry McKame).
|
- Don't enable disabled windows when showing them (Harry McKame).
|
||||||
- Fix assert when using owner-drawn menu items with the newest (Vista) SDK
|
- Fix assert when using owner-drawn menu items with the newest (Vista) SDK.
|
||||||
|
- Fixed wxTextCtrl to not process clipboard events twice if there's
|
||||||
|
a custom wxEVT_COMMAND_TEXT_* event handler.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -1968,6 +1968,19 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
|
// we must handle clipboard events before calling MSWWindowProc, otherwise
|
||||||
|
// the event would be handled twice if there's a handler for it in user
|
||||||
|
// code:
|
||||||
|
switch ( nMsg )
|
||||||
|
{
|
||||||
|
case WM_CUT:
|
||||||
|
case WM_COPY:
|
||||||
|
case WM_PASTE:
|
||||||
|
if ( HandleClipboardEvent(nMsg) )
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
WXLRESULT lRc = wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam);
|
WXLRESULT lRc = wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
|
|
||||||
switch ( nMsg )
|
switch ( nMsg )
|
||||||
@@ -2010,13 +2023,6 @@ WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CUT:
|
|
||||||
case WM_COPY:
|
|
||||||
case WM_PASTE:
|
|
||||||
if ( HandleClipboardEvent(nMsg) )
|
|
||||||
lRc = 0;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return lRc;
|
return lRc;
|
||||||
|
Reference in New Issue
Block a user