Fix drag and drop tab regression

The bug: Drag a short name tab to accross a longger name tab (w/o releasing mouse click) will make a swich - dragging the logger name instead of the shorter name one.
This regression is due to PR "Fix Tab non-responding after dragging bug".

This reverts commit c6e1a95098.

Fix #5072, fix #5450, open #4885
This commit is contained in:
AngryGamer 2019-06-13 22:44:52 -07:00 committed by Don HO
parent 1a97d3c854
commit 895c315df0
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,6 @@
#include <uxtheme.h>
#include <cassert>
#include <codecvt>
#include <locale>
#include "StaticDialog.h"

View File

@ -669,7 +669,6 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
if (_isDragging)
{
exchangeItemData(p);
::CallWindowProc(_tabBarDefaultProc, hwnd, WM_LBUTTONDOWN, wParam, lParam);
// Get cursor position of "Screen"
// For using the function "WindowFromPoint" afterward!!!
@ -1188,6 +1187,9 @@ void TabBarPlus::exchangeTabItemData(int oldTab, int newTab)
// Tell Notepad_plus to notifiy plugins that a D&D operation was done (so doc index has been changed)
::SendMessage(_hParent, NPPM_INTERNAL_DOCORDERCHANGED, 0, oldTab);
//2. set to focus
setActiveTab(newTab);
}
void TabBarPlus::exchangeItemData(POINT point)