mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:21:51 +00:00
[BROWSEUI] Fix crash while editing a label in the folder tree
+ Add a missing break CORE-18646
This commit is contained in:
parent
2f6f24d0f6
commit
460a01b167
1 changed files with 6 additions and 6 deletions
|
@ -1218,10 +1218,8 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::HasFocusIO()
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE CExplorerBand::TranslateAcceleratorIO(LPMSG lpMsg)
|
HRESULT STDMETHODCALLTYPE CExplorerBand::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||||
{
|
{
|
||||||
if (m_isEditing)
|
if (lpMsg->hwnd == m_hWnd ||
|
||||||
return S_FALSE;
|
(m_isEditing && IsChild(lpMsg->hwnd)))
|
||||||
|
|
||||||
if (lpMsg->hwnd == m_hWnd)
|
|
||||||
{
|
{
|
||||||
TranslateMessage(lpMsg);
|
TranslateMessage(lpMsg);
|
||||||
DispatchMessage(lpMsg);
|
DispatchMessage(lpMsg);
|
||||||
|
@ -1298,6 +1296,7 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM
|
||||||
case TVN_BEGINDRAG:
|
case TVN_BEGINDRAG:
|
||||||
case TVN_BEGINRDRAG:
|
case TVN_BEGINRDRAG:
|
||||||
OnTreeItemDragging((LPNMTREEVIEW)lParam, pNotifyHeader->code == TVN_BEGINRDRAG);
|
OnTreeItemDragging((LPNMTREEVIEW)lParam, pNotifyHeader->code == TVN_BEGINRDRAG);
|
||||||
|
break;
|
||||||
case TVN_BEGINLABELEDITW:
|
case TVN_BEGINLABELEDITW:
|
||||||
{
|
{
|
||||||
// TODO: put this in a function ? (mostly copypasta from CDefView)
|
// TODO: put this in a function ? (mostly copypasta from CDefView)
|
||||||
|
@ -1317,9 +1316,10 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
hr = pParent->GetAttributesOf(1, &pChild, &dwAttr);
|
hr = pParent->GetAttributesOf(1, &pChild, &dwAttr);
|
||||||
if (SUCCEEDED(hr) && (dwAttr & SFGAO_CANRENAME) && theResult)
|
if (SUCCEEDED(hr) && (dwAttr & SFGAO_CANRENAME))
|
||||||
{
|
{
|
||||||
*theResult = 0;
|
if (theResult)
|
||||||
|
*theResult = 0;
|
||||||
m_isEditing = TRUE;
|
m_isEditing = TRUE;
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue