diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-06-08 20:11:09 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-06-09 01:38:31 +0200 |
commit | bf7b07050873770bd0b2ed5d73965b5a88d7a351 (patch) | |
tree | f29a06ac56d9197ac7bbd1df19faa7824e9d6cc5 /gui | |
parent | 223a7aba7bfa6019d8a2cfa5e8f8a4791a96d136 (diff) | |
download | MultiMC-bf7b07050873770bd0b2ed5d73965b5a88d7a351.tar MultiMC-bf7b07050873770bd0b2ed5d73965b5a88d7a351.tar.gz MultiMC-bf7b07050873770bd0b2ed5d73965b5a88d7a351.tar.lz MultiMC-bf7b07050873770bd0b2ed5d73965b5a88d7a351.tar.xz MultiMC-bf7b07050873770bd0b2ed5d73965b5a88d7a351.zip |
Show texture/resource packs when appropriate.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/pagedialog/PageDialog.cpp | 13 | ||||
-rw-r--r-- | gui/pages/LegacyUpgradePage.ui | 2 | ||||
-rw-r--r-- | gui/pages/VersionPage.cpp | 3 |
3 files changed, 9 insertions, 9 deletions
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<PageModel *>(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); } diff --git a/gui/pages/LegacyUpgradePage.ui b/gui/pages/LegacyUpgradePage.ui index 43c3eeda..8d676eae 100644 --- a/gui/pages/LegacyUpgradePage.ui +++ b/gui/pages/LegacyUpgradePage.ui @@ -47,7 +47,7 @@ p, li { white-space: pre-wrap; } <item> <widget class="QCommandLinkButton" name="upgradeButton"> <property name="text"> - <string>Start the upgrade!</string> + <string>Start the upgrade! (Not Yet Implemented, Coming Soon™)</string> </property> </widget> </item> diff --git a/gui/pages/VersionPage.cpp b/gui/pages/VersionPage.cpp index 359e71c4..74c3c2af 100644 --- a/gui/pages/VersionPage.cpp +++ b/gui/pages/VersionPage.cpp @@ -368,7 +368,8 @@ void VersionPage::versionCurrent(const QModelIndex ¤t, const QModelIndex & ui->moveLibraryDownBtn->setEnabled(enabled); ui->moveLibraryUpBtn->setEnabled(enabled); } - if(m_version->versionFileId(current.row()) == "net.minecraft") + QString selectedId = m_version->versionFileId(current.row()); + if(selectedId == "net.minecraft" || selectedId == "org.multimc.custom.json") { ui->changeMCVersionBtn->setEnabled(true); } |