Commit 5b86425b authored by Ludovic Fauvet's avatar Ludovic Fauvet Committed by Jean-Baptiste Kempf

qt4: attempt to work around a design flaw in the toolbar editor

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8faa8a8f
......@@ -672,6 +672,11 @@ 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);
......@@ -727,6 +732,8 @@ bool DroppingController::eventFilter( QObject *obj, QEvent *event )
}
if( i == -1 ) return true;
i_dragIndex = i;
doubleInt *dI = widgetList.at( i );
int i_type = dI->i_type;
......
......@@ -112,6 +112,7 @@ private:
};
QRubberBand *rubberband;
QList <doubleInt *> widgetList;
int i_dragIndex;
int getParentPosInLayout( QPoint point);
......
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