[BUG_FIXED] Fix document list panel has no selection while start up.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1280 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-10-25 19:44:57 +00:00
parent d815ae4981
commit daf42f1d62
3 changed files with 14 additions and 8 deletions

View File

@ -747,8 +747,18 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
getTaskListInfo(tli);
if (lParam != 0)
{
for (int idx = 0; idx < (int)tli->_tlfsLst.size(); ++idx)
{
if (tli->_tlfsLst[idx]._iView == currentView() &&
tli->_tlfsLst[idx]._docIndex == _pDocTab->getCurrentTabIndex())
{
tli->_currentIndex = idx;
break;
}
}
return TRUE;
}
if (NppParameters::getInstance()->getNppGUI()._styleMRU)
{
tli->_currentIndex = 0;

View File

@ -72,7 +72,6 @@ void VerticalFileSwitcherListView::init(HINSTANCE hInst, HWND parent, HIMAGELIST
ListView_SetExtendedListViewStyle(_hSelf, LVS_EX_FULLROWSELECT | LVS_EX_BORDERSELECT | LVS_EX_INFOTIP);
ListView_SetItemCountEx(_hSelf, 50, LVSICF_NOSCROLL);
ListView_SetImageList(_hSelf, _hImaLst, LVSIL_SMALL);
ListView_SetItemState(_hSelf, 0, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
}
void VerticalFileSwitcherListView::destroy()
@ -141,6 +140,7 @@ void VerticalFileSwitcherListView::initList()
ListView_SetItemText(_hSelf, i, 1, (LPTSTR)::PathFindExtension(fileNameStatus._fn.c_str()));
}
}
ListView_SetItemState(_hSelf, taskListInfo._currentIndex, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
}
void VerticalFileSwitcherListView::reload()
@ -243,11 +243,7 @@ void VerticalFileSwitcherListView::activateItem(int bufferID, int iView)
for (int i = 0; i < nbItem; ++i)
ListView_SetItemState(_hSelf, i, 0, LVIS_FOCUSED|LVIS_SELECTED);
int i = find(bufferID, iView);
if (i == -1)
{
newItem(bufferID, iView);
}
int i = newItem(bufferID, iView);
ListView_SetItemState(_hSelf, i, LVIS_FOCUSED|LVIS_SELECTED, LVIS_FOCUSED|LVIS_SELECTED);
}

View File

@ -74,7 +74,7 @@
<AdditionalOptions>/fixed:no %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>LinkVerboseLib</ShowProgress>
<OutputFile>$(OutDir)notepadPlus_Debug.exe</OutputFile>
<OutputFile>$(OutDir)notepad++.exe</OutputFile>
<Version>1.0</Version>
<TypeLibraryFile>/TLBID</TypeLibraryFile>
<TypeLibraryResourceID>5</TypeLibraryResourceID>