1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-18 09:18:23 +01:00

* 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.
This commit is contained in:
Theron Tock 2011-07-18 15:05:10 -07:00
parent 08f1b604a5
commit 2c70ef0583
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-07-18 theron <theron@netcitadel.com>
* 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 <theron@netcitadel.com>
* Fixed #2505: make sure that objects that we show are members of
a dynamic group are actually objects. Previously we were showing

View File

@ -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<FWObject *> &objs)
void ObjectTreeView::dragMoveEvent(QDragMoveEvent *ev)
{
/* Call the parent so that auto-scrolling works properly */
QTreeWidget::dragMoveEvent(ev);
list<FWObject*> objs;
if (ev->source() != this || !FWObjectDrag::decode(ev, objs) ||
!isValidDropTarget(itemAt(ev->pos()), objs)) {