From eb76b18ee3d1a6899176eb398ffc9f87ad21fd34 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 15 Jun 2021 01:23:50 +0200 Subject: [PATCH] PixelPaint: Don't allow creating empty layers or images --- Userland/Applications/PixelPaint/CreateNewImageDialog.cpp | 4 ++-- 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());