Skip to content

Commit

Permalink
qtui: Fix playlist drag-and-drop. Closes: #831.
Browse files Browse the repository at this point in the history
Regression caused by 592e3d6 (qtui: Enable song info popup on mouseover).
  • Loading branch information
jlindgren90 committed Nov 1, 2018
1 parent 0b9c270 commit e7a6c81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/qtui/playlist-qt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,18 @@ void PlaylistWidget::mouseMoveEvent (QMouseEvent * event)
int row = indexToRow (indexAt (event->pos ()));

if (row < 0)
{
hidePopup ();
return;
}

if (aud_get_bool (nullptr, "show_filepopup_for_tuple") && m_popup_pos != row)
else if (aud_get_bool (nullptr, "show_filepopup_for_tuple") && m_popup_pos != row)
triggerPopup (row);

audqt::TreeView::mouseMoveEvent (event);
}

void PlaylistWidget::leaveEvent (QEvent *)
void PlaylistWidget::leaveEvent (QEvent * event)
{
hidePopup ();

audqt::TreeView::leaveEvent (event);
}

/* Since Qt doesn't support both DragDrop and InternalMove at once,
Expand Down
2 changes: 1 addition & 1 deletion src/qtui/playlist-qt.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class PlaylistWidget : public audqt::TreeView
void contextMenuEvent (QContextMenuEvent * event);
void keyPressEvent (QKeyEvent * event);
void mouseMoveEvent (QMouseEvent * event);
void leaveEvent (QEvent *);
void leaveEvent (QEvent * event);
void dragMoveEvent (QDragMoveEvent * event);
void dropEvent (QDropEvent * event);
void currentChanged (const QModelIndex & current, const QModelIndex & previous);
Expand Down

0 comments on commit e7a6c81

Please sign in to comment.