vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Thu Dec 6 18:32:42 2012 +0100| [263dd77ea5425866f4d827a282b0a4626fa62528] | committer: Jean-Baptiste Kempf
Qt: fix toolbar customization when doing back and forth Close #7543 (cherry picked from commit 22faed61d33d747226e5238466c30b56a9fec4f3) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=263dd77ea5425866f4d827a282b0a4626fa62528 --- modules/gui/qt4/dialogs/toolbar.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp index df50922..ab11b2f 100644 --- a/modules/gui/qt4/dialogs/toolbar.cpp +++ b/modules/gui/qt4/dialogs/toolbar.cpp @@ -722,11 +722,6 @@ void DroppingController::dropEvent( QDropEvent *event ) { int i = getParentPosInLayout( event->pos() ); - /* Workaround: do not let the item move to its current - position + 1 as it breaks the widgetList */ - if ( i - 1 == i_dragIndex ) - --i; - QByteArray data = event->mimeData()->data( "vlc/button-bar" ); QDataStream dataStream(&data, QIODevice::ReadOnly); @@ -800,11 +795,11 @@ bool DroppingController::eventFilter( QObject *obj, QEvent *event ) /* Remove before the drag to not mess DropEvent, that will createAndAddWidget */ widgetList.removeAt( i ); + controlLayout->removeWidget( widg ); + widg->hide(); /* Start the effective drag */ drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::MoveAction); - widg->hide(); - controlLayout->removeWidget( widg ); b_draging = false; } return true; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
