diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-06-03 02:08:40 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-06-09 01:38:31 +0200 |
commit | 694067c603ec14eba16e452e77bc7ce442fa36dd (patch) | |
tree | dfbc78e11f1b0e2804be2d4a36eb0fb40146fddc | |
parent | 6b3d1101cb801367edef8f35b3eee4499e04866b (diff) | |
download | MultiMC-694067c603ec14eba16e452e77bc7ce442fa36dd.tar MultiMC-694067c603ec14eba16e452e77bc7ce442fa36dd.tar.gz MultiMC-694067c603ec14eba16e452e77bc7ce442fa36dd.tar.lz MultiMC-694067c603ec14eba16e452e77bc7ce442fa36dd.tar.xz MultiMC-694067c603ec14eba16e452e77bc7ce442fa36dd.zip |
Only enable move buttons for version patches that can move. HACK HACK
-rw-r--r-- | gui/pages/VersionPage.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/pages/VersionPage.cpp b/gui/pages/VersionPage.cpp index 99232a25..cc728e75 100644 --- a/gui/pages/VersionPage.cpp +++ b/gui/pages/VersionPage.cpp @@ -358,9 +358,14 @@ void VersionPage::versionCurrent(const QModelIndex ¤t, const QModelIndex & if (!current.isValid()) { ui->removeLibraryBtn->setDisabled(true); + ui->moveLibraryDownBtn->setDisabled(true); + ui->moveLibraryUpBtn->setDisabled(true); } else { - ui->removeLibraryBtn->setEnabled(m_version->canRemove(current.row())); + bool enabled = m_version->canRemove(current.row()); + ui->removeLibraryBtn->setEnabled(enabled); + ui->moveLibraryDownBtn->setEnabled(enabled); + ui->moveLibraryUpBtn->setEnabled(enabled); } } |