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
This commit is contained in:
parent
5e76ba238e
commit
58ded005bd
|
@ -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…
Reference in New Issue