]> git.cworth.org Git - apitrace/commitdiff
Expand surface items if there's not too many of them.
authorZack Rusin <zack@kde.org>
Tue, 12 Apr 2011 00:39:50 +0000 (20:39 -0400)
committerZack Rusin <zack@kde.org>
Tue, 12 Apr 2011 00:39:50 +0000 (20:39 -0400)
gui/mainwindow.cpp

index f234527609064b4567411fbd941a4b86d496b7a7..2627cb5c45cb869c667867927bd3dbdb7f978cfe 100644 (file)
@@ -358,6 +358,9 @@ void MainWindow::fillStateForFrame()
             QTreeWidgetItem *textureItem =
                 new QTreeWidgetItem(m_ui.surfacesTreeWidget);
             textureItem->setText(0, tr("Textures"));
+            if (textures.count() <= 6)
+                textureItem->setExpanded(true);
+
             for (int i = 0; i < textures.count(); ++i) {
                 const ApiTexture &texture =
                     textures[i];
@@ -381,6 +384,9 @@ void MainWindow::fillStateForFrame()
             QTreeWidgetItem *fboItem =
                 new QTreeWidgetItem(m_ui.surfacesTreeWidget);
             fboItem->setText(0, tr("Framebuffers"));
+            if (fbos.count() <= 6)
+                fboItem->setExpanded(true);
+
             for (int i = 0; i < fbos.count(); ++i) {
                 const ApiFramebuffer &fbo =
                     fbos[i];