From 94cf9d53cabe5fcb880c9b5f83d34f0a3a04c81d Mon Sep 17 00:00:00 2001 From: Rajendra Singh Date: Fri, 19 Oct 2018 01:58:06 +0530 Subject: [PATCH] Fix tool tip in document switcher showing the old name issue (after being renamed). Fix #4910, close #4936 --- .../VerticalFileSwitcher/VerticalFileSwitcherListView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp index 3f8673bea..1e17ecad8 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp @@ -234,14 +234,15 @@ void VerticalFileSwitcherListView::setItemIconStatus(BufferID bufferID) TaskLstFnStatus *tlfs = (TaskLstFnStatus *)(item.lParam); if (tlfs->_bufID == bufferID) { + tlfs->_fn = buf->getFullPathName(); item.mask = LVIF_TEXT | LVIF_IMAGE; ListView_SetItem(_hSelf, &item); if (isExtColumn) { ListView_SetItemText(_hSelf, i, 1, (LPTSTR)::PathFindExtension(buf->getFileName())); - } + break; } } } @@ -286,7 +287,7 @@ int VerticalFileSwitcherListView::add(BufferID bufferID, int iView) Buffer *buf = static_cast(bufferID); const TCHAR *fileName = buf->getFileName(); - TaskLstFnStatus *tl = new TaskLstFnStatus(iView, 0, fileName, 0, (void *)bufferID); + TaskLstFnStatus *tl = new TaskLstFnStatus(iView, 0, buf->getFullPathName(), 0, (void *)bufferID); TCHAR fn[MAX_PATH]; lstrcpy(fn, ::PathFindFileName(fileName));