Implemented lots of actions in EditSpriteDialog
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "createspritedialog.h"
|
||||
#include "ui_createspritedialog.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "editorguiutils.h"
|
||||
@@ -32,3 +33,19 @@ QSize CreateSpriteDialog::spriteSize() const
|
||||
{
|
||||
return QSize{m_ui->spinBoxWidth->value(), m_ui->spinBoxHeight->value()};
|
||||
}
|
||||
|
||||
void CreateSpriteDialog::accept()
|
||||
{
|
||||
const auto size = spriteSize();
|
||||
if (size.width() < 1)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Zero width not possible!"), tr("Zero width not possible!"));
|
||||
return;
|
||||
}
|
||||
if (size.height() < 1)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Zero height not possible!"), tr("Zero height not possible!"));
|
||||
return;
|
||||
}
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user