diff options
author | Andreas Kling <kling@serenityos.org> | 2021-06-15 01:23:50 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-15 10:05:16 +0200 |
commit | eb76b18ee3d1a6899176eb398ffc9f87ad21fd34 (patch) | |
tree | f15dbfefd94f1f775b8a3d0604059dfd08cd9fc7 /Userland | |
parent | 8731bc9eade3d3cda9a7c097c2443d3c3acd383b (diff) | |
download | serenity-eb76b18ee3d1a6899176eb398ffc9f87ad21fd34.zip |
PixelPaint: Don't allow creating empty layers or images
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/PixelPaint/CreateNewImageDialog.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp b/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp index 1bd76917bb..01a7763455 100644 --- a/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp +++ b/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp @@ -64,8 +64,8 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window) m_image_size.set_height(value); }; - width_spinbox.set_range(0, 16384); - height_spinbox.set_range(0, 16384); + width_spinbox.set_range(1, 16384); + height_spinbox.set_range(1, 16384); } } diff --git a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp index f6df5fa373..cd9f89fa4a 100644 --- a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp +++ b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp @@ -65,8 +65,8 @@ CreateNewLayerDialog::CreateNewLayerDialog(Gfx::IntSize const& suggested_size, G m_layer_size.set_height(value); }; - width_spinbox.set_range(0, 16384); - height_spinbox.set_range(0, 16384); + width_spinbox.set_range(1, 16384); + height_spinbox.set_range(1, 16384); width_spinbox.set_value(suggested_size.width()); height_spinbox.set_value(suggested_size.height()); |