From bf7b07050873770bd0b2ed5d73965b5a88d7a351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 8 Jun 2014 20:11:09 +0200 Subject: Show texture/resource packs when appropriate. --- gui/pagedialog/PageDialog.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'gui/pagedialog/PageDialog.cpp') diff --git a/gui/pagedialog/PageDialog.cpp b/gui/pagedialog/PageDialog.cpp index f71cfdcc..1169af2c 100644 --- a/gui/pagedialog/PageDialog.cpp +++ b/gui/pagedialog/PageDialog.cpp @@ -40,14 +40,13 @@ public: protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { - // Regular contents check, then check page-filter. - if (QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent)) - return true; - const QString pattern = filterRegExp().pattern(); const auto model = static_cast(sourceModel()); const auto page = model->pages().at(sourceRow); - return page->shouldDisplay(); + if(!page->shouldDisplay()) + return false; + // Regular contents check, then check page-filter. + return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent); } }; @@ -92,7 +91,7 @@ void PageDialog::createUI() m_filter = new QLineEdit; m_pageList = new PageView; m_header = new QLabel(); - m_iconHeader = new IconLabel(this, QIcon::fromTheme("bug"), QSize(24,24)); + m_iconHeader = new IconLabel(this, QIcon(), QSize(24,24)); QFont headerLabelFont = m_header->font(); headerLabelFont.setBold(true); @@ -125,7 +124,7 @@ void PageDialog::createUI() mainGridLayout->addLayout(headerHLayout, 0, 1, 1, 1); mainGridLayout->addWidget(m_pageList, 0, 0, 2, 1); mainGridLayout->addLayout(m_pageStack, 1, 1, 1, 1); - mainGridLayout->addWidget(buttons, 2, 0, 1, 2); + //mainGridLayout->addWidget(buttons, 2, 0, 1, 2); mainGridLayout->setColumnStretch(1, 4); setLayout(mainGridLayout); } -- cgit v1.2.3