From 72f779b4bd8f41532431057d9f334bf06bb72369 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Fri, 2 Nov 2018 04:19:46 +0800 Subject: [PATCH] fix bug that content_view doesn't work correctly with dnd --- source/gui/widgets/skeletons/content_view.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/gui/widgets/skeletons/content_view.cpp b/source/gui/widgets/skeletons/content_view.cpp index cb7e291b..cb763b28 100644 --- a/source/gui/widgets/skeletons/content_view.cpp +++ b/source/gui/widgets/skeletons/content_view.cpp @@ -124,13 +124,16 @@ namespace nana { } else if (event_code::mouse_move == arg.evt_code) { - if (this->drag_view_move && (dragdrop_status::not_ready == API::window_dragdrop_status(this->window_handle))) + if (dragdrop_status::not_ready != API::window_dragdrop_status(this->window_handle)) { - if (this->drive(arg.pos)) - { - tmr.interval(16); - tmr.start(); - } + //When dnd is in progress, it cancels the move_view operation. + this->drag_view_move = false; + tmr.stop(); + } + else if (this->drag_view_move && this->drive(arg.pos)) + { + tmr.interval(16); + tmr.start(); } } else if (event_code::mouse_up == arg.evt_code)