From: <sag...@us...> - 2013-04-05 22:45:42
|
Revision: 1742 http://sourceforge.net/p/modplug/code/1742 Author: saga-games Date: 2013-04-05 22:45:30 +0000 (Fri, 05 Apr 2013) Log Message: ----------- [Fix] Tree view: Lowercase letters can now be entered properly into name fields as well. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2013-04-05 17:41:18 UTC (rev 1741) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2013-04-05 22:45:30 UTC (rev 1742) @@ -123,6 +123,7 @@ m_hDropWnd = NULL; m_hInsLib = m_hMidiLib = NULL; m_nDocNdx = m_nDragDocNdx = 0; + doLabelEdit = false; MemsetZero(m_tiMidiGrp); MemsetZero(m_tiMidi); MemsetZero(m_tiPerc); @@ -229,7 +230,7 @@ KeyEventType kT = ih->GetKeyEventType(nFlags); InputTargetContext ctx = (InputTargetContext)(kCtxViewTree); - if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) + if (!doLabelEdit && ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) return true; // Mapped to a command, no need to pass message on. } //end rewbs.customKeys @@ -1048,7 +1049,7 @@ uint64 CModTree::GetModItem(HTREEITEM hItem) -//----------------------------------------- +//------------------------------------------ { LPARAM lParam; HTREEITEM hItemParent, hItemParentParent, hRootParent; @@ -3205,7 +3206,7 @@ pSndFile->m_szInstrumentPath[modItemID - 1] = files.first_file; } - pModDoc->SaveInstrument(modItemID); + pModDoc->SaveInstrument(static_cast<INSTRUMENTINDEX>(modItemID)); if(pModDoc) pModDoc->UpdateAllViews(NULL, HINT_MODTYPE); OnRefreshTree(); @@ -3534,6 +3535,7 @@ if(text) { + doLabelEdit = true; CMainFrame::GetMainFrame()->GetInputHandler()->Bypass(true); editCtrl->SetWindowText(text); *result = FALSE; @@ -3549,6 +3551,7 @@ //---------------------------------------------------------- { CMainFrame::GetMainFrame()->GetInputHandler()->Bypass(false); + doLabelEdit = false; NMTVDISPINFO *info = reinterpret_cast<NMTVDISPINFO *>(nmhdr); const uint64 modItem = GetModItem(info->item.hItem); Modified: trunk/OpenMPT/mptrack/View_tre.h =================================================================== --- trunk/OpenMPT/mptrack/View_tre.h 2013-04-05 17:41:18 UTC (rev 1741) +++ trunk/OpenMPT/mptrack/View_tre.h 2013-04-05 22:45:30 UTC (rev 1742) @@ -128,7 +128,7 @@ vector<HTREEITEM> m_tiDLS; vector<ModTreeDocInfo *> DocInfo; // Instrument library - bool m_bShowAllFiles; + bool m_bShowAllFiles, doLabelEdit; CHAR m_szInstrLibPath[_MAX_PATH], m_szOldPath[_MAX_PATH], m_szSongName[_MAX_PATH]; public: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |