From 41b2aa9068dfc110a35bc7b96a31436dd0f27ba1 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 8 Jan 2019 19:01:21 +0000 Subject: [PATCH] CtrlLib: Fixed remaining issue with DisplayPopup and D&D git-svn-id: svn://ultimatepp.org/upp/trunk@12655 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/DisplayPopup.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/uppsrc/CtrlLib/DisplayPopup.cpp b/uppsrc/CtrlLib/DisplayPopup.cpp index 7f1e7f181..e5a8a9c00 100644 --- a/uppsrc/CtrlLib/DisplayPopup.cpp +++ b/uppsrc/CtrlLib/DisplayPopup.cpp @@ -14,6 +14,7 @@ void DisplayPopup::LeftDown(Point p, dword flags) void DisplayPopup::LeftDrag(Point p, dword flags) { + DLOG("LeftDrag"); ctrl->LeftDrag(Op(p), flags); } @@ -53,6 +54,8 @@ void DisplayPopup::Paint(Draw& w) { Rect r = GetSize(); w.DrawRect(r, SColorPaper); + DDUMP(display); + DDUMP(value); if(display) { display->PaintBackground(w, r, value, ink, paper, style); r.left += margin; @@ -172,6 +175,8 @@ bool DisplayPopup::MouseHook(Ctrl *, bool, int, Point, int, dword) void DisplayPopup::Cancel() { + if(GetDragAndDropSource()) + return; display = NULL; Sync(); } @@ -190,7 +195,7 @@ void DisplayPopup::Set(Ctrl *_ctrl, const Rect& _item, const Value& _value, const Display *_display, Color _ink, Color _paper, dword _style, int _margin) { - if(!GUI_ToolTips()) + if(!GUI_ToolTips() || GetDragAndDropSource()) return; if(item != _item || ctrl != _ctrl || value != _value || display != _display || ink != _ink || paper != _paper || style != _style) {