Fix Folder As Workspace double clicking issue

Fix input focus not in edit window after double click in Project or Folder As Workspace.

Fix #4656, fix #8361, close #8369
pull/8420/head
Udo Hoffmann 5 years ago committed by Don HO
parent 5e76ba238e
commit 58ded005bd
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

@ -513,15 +513,15 @@ void FileBrowser::openSelectFile()
HTREEITEM selectedNode = _treeView.getSelection();
if (!selectedNode) return;
generic_string fullPath = getNodePath(selectedNode);
_selectedNodeFullPath = getNodePath(selectedNode);
// test the path - if it's a file, open it, otherwise just fold or unfold it
if (!::PathFileExists(fullPath.c_str()))
if (!::PathFileExists(_selectedNodeFullPath.c_str()))
return;
if (::PathIsDirectory(fullPath.c_str()))
if (::PathIsDirectory(_selectedNodeFullPath.c_str()))
return;
::SendMessage(_hParent, NPPM_DOOPEN, 0, reinterpret_cast<LPARAM>(fullPath.c_str()));
::PostMessage(_hParent, NPPM_DOOPEN, 0, reinterpret_cast<LPARAM>(_selectedNodeFullPath.c_str()));
}

@ -176,6 +176,8 @@ protected:
HMENU _hFileMenu = NULL;
std::vector<FolderUpdater *> _folderUpdaters;
generic_string _selectedNodeFullPath; // this member is used only for PostMessage call
std::vector<SortingData4lParam*> sortingDataArray;
void initPopupMenus();

@ -579,7 +579,7 @@ void ProjectPanel::openSelectFile()
tvItem.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE;
if (::PathFileExists(fn->c_str()))
{
::SendMessage(_hParent, NPPM_DOOPEN, 0, reinterpret_cast<LPARAM>(fn->c_str()));
::PostMessage(_hParent, NPPM_DOOPEN, 0, reinterpret_cast<LPARAM>(fn->c_str()));
tvItem.iImage = INDEX_LEAF;
tvItem.iSelectedImage = INDEX_LEAF;
}

Loading…
Cancel
Save