Skip to content

Commit

Permalink
Minor improvements to messages
Browse files Browse the repository at this point in the history
  • Loading branch information
aphototool committed Sep 30, 2022
1 parent 8a7ef3c commit 7410afc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/aphototoollibre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ void APhotoToolLibre::loadImage(QString fileName, QImage tempImage) {

void APhotoToolLibre::onSaveButtonClicked()
{
if (values.image.height() <= 0) {
if (QMessageBox::Close == QMessageBox(QMessageBox::Information, tr("Nothing to save"), tr("Load new photo to edit and then save."), QMessageBox::Close, this).exec())
{
return;
}
}

QApplication::setOverrideCursor(Qt::WaitCursor);
ui->previewLabel->setText("Working...");
QTimer::singleShot(100, this, [this]() { saveFullResImage(); } );
Expand Down Expand Up @@ -445,6 +452,12 @@ bool APhotoToolLibre::event(QEvent *event)
}

void APhotoToolLibre::onPrintClicked() {
if (values.image.height() <= 0) {
if (QMessageBox::Close == QMessageBox(QMessageBox::Information, tr("Nothing to print"), tr("Load new photo to edit and print."), QMessageBox::Close, this).exec())
{
return;
}
}
Print print;
print.print(values.image);
}
Expand Down
Binary file modified src/resources/Welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7410afc

Please sign in to comment.