[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/kjots
From:       Stephen Kelly <steveire () gmail ! com>
Date:       2010-06-16 12:46:23
Message-ID: 20100616124623.C34DFAC8D8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1138659 by skelly:

Expand new rows when they are added.

This is not very smart - it expands much more than we want but that's ok.

 M  +10 -5     kjotstreeview.cpp  
 M  +2 -0      kjotstreeview.h  


--- trunk/KDE/kdepim/kjots/kjotstreeview.cpp #1138658:1138659
@@ -221,8 +221,13 @@
   }
 }
 
-
-
-
-
-
+void KJotsTreeView::rowsInserted(const QModelIndex& parent, int start, int end)
+{
+  QTreeView::rowsInserted(parent, start, end);
+  for ( int row = start; row <= end; ++row )
+  {
+    static const int column = 0;
+    const QModelIndex index = model()->index(row, column, parent);
+    expand(index);
+  }
+}
--- trunk/KDE/kdepim/kjots/kjotstreeview.h #1138658:1138659
@@ -38,6 +38,8 @@
 protected:
   virtual void contextMenuEvent( QContextMenuEvent *event );
 
+  virtual void rowsInserted(const QModelIndex& parent, int start, int end);
+
 protected slots:
   void renameEntry();
   void copyLinkAddress();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic