From 2bcb3fa88c9bfc6a366d4e413ce240074baa44df Mon Sep 17 00:00:00 2001
From: Zack Rusin <zack@kde.org>
Date: Mon, 11 Apr 2011 20:39:50 -0400
Subject: [PATCH] Expand surface items if there's not too many of them.

---
 gui/mainwindow.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index f234527..2627cb5 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -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];
-- 
2.45.2