[Digikam-devel] [Bug 139547] tag hierarchy automatic fill

Gilles Caulier caulier.gilles at kdemail.net
Mon Jan 8 20:46:40 GMT 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=139547         




------- Additional Comments From caulier.gilles kdemail net  2007-01-08 21:46 -------
SVN commit 621456 by cgilles:

digikam from trunk : Tags Filter View popup menu behaviours. Do not toogle the current Tags checkbox from treeview when user click with right mouse button to get popup menu.
CCBUGS: 139547

 M  +17 -0     tagfilterview.cpp  
 M  +1 -0      tagfilterview.h  


--- trunk/extragear/graphics/digikam/digikam/tagfilterview.cpp #621455:621456
 @ -287,6 +287,23  @
     d->timer->start(50, true);
 }
 
+void TagFilterView::contentsMousePressEvent(QMouseEvent *e)
+{
+    QPoint vp = contentsToViewport(e->pos());
+    TagFilterViewItem *item = dynamic_cast<TagFilterViewItem*>(itemAt(vp));
+
+    if(item && e->button() == RightButton) 
+    {
+        bool isOn = item->isOn();
+        QListView::contentsMousePressEvent(e);
+        // Restore the status of checkbox. 
+        item->setOn(isOn);
+        return;
+    }
+
+    QListView::contentsMousePressEvent(e);
+}
+
 QDragObject* TagFilterView::dragObject()
 {
     QValueList<int> dragTagIDs;
--- trunk/extragear/graphics/digikam/digikam/tagfilterview.h #621455:621456
 @ -60,6 +60,7  @
     QDragObject* dragObject();
     bool acceptDrop(const QDropEvent *e) const;
     void contentsDropEvent(QDropEvent *e);
+    void contentsMousePressEvent(QMouseEvent *e);
 
 private slots:



More information about the Digikam-devel mailing list