File clementine-1.3.1-fix-library-clicks.patch of Package clementine

--- a/src/widgets/autoexpandingtreeview.cpp
+++ b/src/widgets/autoexpandingtreeview.cpp
@@ -113,6 +113,20 @@ void AutoExpandingTreeView::mousePressEv
   }
 }
 
+void AutoExpandingTreeView::mouseDoubleClickEvent(QMouseEvent* event) {
+  State p_state = state();
+  QModelIndex index = indexAt(event->pos());
+
+  QTreeView::mouseDoubleClickEvent(event);
+
+  // If the p_state was the "AnimatingState", then the base class's
+  // "mouseDoubleClickEvent" method just did nothing, hence the
+  // "doubleClicked" signal is not emitted. So let's do it ourselves.
+  if (index.isValid() && p_state == AnimatingState) {
+    emit doubleClicked(index);
+  }
+}
+
 void AutoExpandingTreeView::keyPressEvent(QKeyEvent* e) {
   switch (e->key()) {
     case Qt::Key_Enter:
--- a/src/widgets/autoexpandingtreeview.h
+++ b/src/widgets/autoexpandingtreeview.h
@@ -47,6 +47,7 @@ signals:
 
   // QWidget
   void mousePressEvent(QMouseEvent* event);
+  void mouseDoubleClickEvent(QMouseEvent* event);
   void keyPressEvent(QKeyEvent* event);
 
   virtual bool CanRecursivelyExpand(const QModelIndex& index) const {
openSUSE Build Service is sponsored by