Skip to content
Snippets Groups Projects
Unverified Commit dad5244e authored by YU LIU's avatar YU LIU Committed by GitHub
Browse files

Disable the generation of empty images

parent 37123f04
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,18 @@ void SinusSynthesisOp::operator()(const imagein::Image*, const std::map<const im
QDialog::DialogCode code = static_cast<QDialog::DialogCode>(dialog->exec());
if(code!=QDialog::Accepted) return;
if(dialog->getWidth()==0 || dialog->getHeight()==0){
QMessageBox *msgBox;
msgBox = new QMessageBox(QObject::tr("Warning"),
QObject::tr(" Empty image creation is not allowed "),
QMessageBox::Warning,
QMessageBox::Ok | QMessageBox::Default,
QMessageBox::NoRole | QMessageBox::Escape,
0);
msgBox->show();
return;
}
GrayscaleImage* resImg = new GrayscaleImage(sizeBox->value(), sizeBox->value());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment