summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-14 14:42:29 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-14 14:42:29 +0000
commit28f328e09c6227ab6248c91ae0690a02d9d23300 (patch)
tree19ec0d4e4a2d98f0a3afc898f3808e59d65737e9
parent28cc3197d585f94335d7e7e38f13373d345f799d (diff)
Fix placeholder creation when dragging from one DnDVBox to
another (should fix #4421). git-svn-id: svn://localhost/ardour2/branches/3.0@10584 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/dndvbox.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h
index cd7bf01a79..a5b85234c4 100644
--- a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h
+++ b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h
@@ -416,13 +416,19 @@ private:
/* whether we're in the top or bottom half of the child that we're over */
bool top_half = (c - int (c)) < 0.5;
- if (top_half && (before == _drag_child || at == _drag_child)) {
+ /* Note that when checking on whether to remove a placeholder, we never do
+ so if _drag_child is 0 as this means that the child being dragged is
+ coming from a different DnDVBox, so it will never be the same as any
+ of our children.
+ */
+
+ if (top_half && _drag_child && (before == _drag_child || at == _drag_child)) {
/* dropping here would have no effect, so remove the visual cue */
remove_placeholder ();
return false;
}
- if (!top_half && (at == _drag_child || after == _drag_child)) {
+ if (!top_half && _drag_child && (at == _drag_child || after == _drag_child)) {
/* dropping here would have no effect, so remove the visual cue */
remove_placeholder ();
return false;