From: Zack Rusin Date: Tue, 12 Apr 2011 00:39:50 +0000 (-0400) Subject: Expand surface items if there's not too many of them. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=2bcb3fa88c9bfc6a366d4e413ce240074baa44df;p=apitrace Expand surface items if there's not too many of them. --- 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];