Only enable move buttons for version patches that can move. HACK HACK

This commit is contained in:
Petr Mrázek 2014-06-03 02:08:40 +02:00
parent 6b3d1101cb
commit 694067c603

View File

@ -358,9 +358,14 @@ void VersionPage::versionCurrent(const QModelIndex &current, 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);
}
}