Commit 263dd77e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix toolbar customization when doing back and forth

Close #7543
(cherry picked from commit 22faed61d33d747226e5238466c30b56a9fec4f3)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 81a32844
...@@ -722,11 +722,6 @@ void DroppingController::dropEvent( QDropEvent *event ) ...@@ -722,11 +722,6 @@ void DroppingController::dropEvent( QDropEvent *event )
{ {
int i = getParentPosInLayout( event->pos() ); 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" ); QByteArray data = event->mimeData()->data( "vlc/button-bar" );
QDataStream dataStream(&data, QIODevice::ReadOnly); QDataStream dataStream(&data, QIODevice::ReadOnly);
...@@ -800,11 +795,11 @@ bool DroppingController::eventFilter( QObject *obj, QEvent *event ) ...@@ -800,11 +795,11 @@ bool DroppingController::eventFilter( QObject *obj, QEvent *event )
/* Remove before the drag to not mess DropEvent, /* Remove before the drag to not mess DropEvent,
that will createAndAddWidget */ that will createAndAddWidget */
widgetList.removeAt( i ); widgetList.removeAt( i );
controlLayout->removeWidget( widg );
widg->hide();
/* Start the effective drag */ /* Start the effective drag */
drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::MoveAction); drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::MoveAction);
widg->hide();
controlLayout->removeWidget( widg );
b_draging = false; b_draging = false;
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment