Add more comprehensive messages when adding custom icons

* Error messages now display for 15 seconds and are closable
* Add button is always enabled
This commit is contained in:
Jonathan White 2018-06-03 12:42:33 -04:00
parent b07d4efe5f
commit 2e292699b7
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
3 changed files with 63 additions and 24 deletions

View file

@ -125,8 +125,14 @@ void EditWidget::enableApplyButton(bool enabled)
void EditWidget::showMessage(const QString& text, MessageWidget::MessageType type)
{
m_ui->messageWidget->setCloseButtonVisible(false);
m_ui->messageWidget->showMessage(text, type, 2000);
// Show error messages for a longer time to make sure the user can read them
if (type == MessageWidget::Error) {
m_ui->messageWidget->setCloseButtonVisible(true);
m_ui->messageWidget->showMessage(text, type, 15000);
} else {
m_ui->messageWidget->setCloseButtonVisible(false);
m_ui->messageWidget->showMessage(text, type, 2000);
}
}
void EditWidget::hideMessage()