From 2c70ef05832f24d3125c810e17beb1433cd0af9e Mon Sep 17 00:00:00 2001 From: Theron Tock Date: Mon, 18 Jul 2011 15:05:10 -0700 Subject: [PATCH] * Fixed #2511: make sure auto-scroll of items in ObjectTreeView works, otherwise it's impossible to move an item into a user-defined folder if there are lots of intervening items. --- doc/ChangeLog | 5 +++++ src/libgui/ObjectTreeView.cpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index e77871483..8c935cfbc 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-18 theron + * Fixed #2511: make sure auto-scroll of items in ObjectTreeView + works, otherwise it's impossible to move an item into a + user-defined folder if there are lots of intervening items. + 2011-07-13 theron * Fixed #2505: make sure that objects that we show are members of a dynamic group are actually objects. Previously we were showing diff --git a/src/libgui/ObjectTreeView.cpp b/src/libgui/ObjectTreeView.cpp index 9d8f107a1..e4c28a434 100644 --- a/src/libgui/ObjectTreeView.cpp +++ b/src/libgui/ObjectTreeView.cpp @@ -154,7 +154,8 @@ ObjectTreeView::ObjectTreeView(ProjectPanel* project, setMinimumSize( QSize( 100, 0 ) ); - setAutoScroll( TRUE ); + setAutoScroll(true); + setAutoScrollMargin(50); setAllColumnsShowFocus( TRUE ); setSelectionMode( ExtendedSelection ); setAcceptDrops( true ); @@ -517,6 +518,9 @@ static bool isValidDropTarget(QTreeWidgetItem *item, list &objs) void ObjectTreeView::dragMoveEvent(QDragMoveEvent *ev) { + /* Call the parent so that auto-scrolling works properly */ + QTreeWidget::dragMoveEvent(ev); + list objs; if (ev->source() != this || !FWObjectDrag::decode(ev, objs) || !isValidDropTarget(itemAt(ev->pos()), objs)) {