[Uml-devel] KDE/kdesdk/umbrello/umbrello

Ralf Habacker ralf.habacker at gmail.com
Sat Dec 17 11:56:35 UTC 2011


SVN commit 1268945 by habacker:

implemented iteration over the list view items using keyboard and show documentation of related item

 M  +2 -6      umllistview.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #1268944:1268945
@@ -329,19 +329,15 @@
                 deleteItem(item);
             }
         }
-#if 0
-        // using keyboard to iterate through the items and showing doc do not work as expected
         else if (k == Qt::Key_Up || k == Qt::Key_Down) {
             UMLListViewItem *current = static_cast<UMLListViewItem*>(currentItem());
-            UMLListViewItem *item = static_cast<UMLListViewItem*>((k == Qt::Key_Down) ? current->itemBelow() : current->itemAbove());
-            setSelected(current, false);
+            UMLListViewItem *item = static_cast<UMLListViewItem*>((k == Qt::Key_Down) ? itemBelow(current) : itemAbove(current));
             if (item) {
-                setSelected(item, true);
+                setCurrentItem(item);
                 m_doc->changeCurrentView(item->getID());
                 UMLApp::app()->docWindow()->showDocumentation(item->umlObject(), false);
             }
         }
-#endif
         else {
             QTreeWidget::keyPressEvent(ke); // let parent handle it
         }




More information about the umbrello-devel mailing list