Bug 408166 - Rectangular grid spacing limits incorrect after resizing canvas
Summary: Rectangular grid spacing limits incorrect after resizing canvas
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-01 03:57 UTC by Carl Olsson
Modified: 2019-06-04 15:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Olsson 2019-06-01 03:57:17 UTC
SUMMARY
Normally the rectangular grid spacing appears to be limited to a maximum of half the image size, however after resizing an image the maximum spacing remains unchanged.

Saving and reloading the resized image returns the grid spacing limit to the expected value for the image size.

I don't see why it needs to be limited at all beyond the storage type limit.

STEPS TO REPRODUCE
1. Create small image
2. Set rectangular grid spacing to maximum for image size
3. Resize canvas considerably larger
4. Try to increase grid spacing

OBSERVED RESULT
The grid spacing cannot be increased beyond the limit for the initial image size.

EXPECTED RESULT
The grid spacing should be able to increase to the expected limit of half the enlarged image size.

SOFTWARE/OS VERSIONS
Windows: Microsoft Windows 10 Pro 10.0.17763 Build 17763
Comment 1 Carl Olsson 2019-06-01 22:50:37 UTC
Added patch to fix this here: https://phabricator.kde.org/D21528
Comment 2 Halla Rempt 2019-06-04 07:42:49 UTC
Git commit 2f31a94aea8ce6de0a498a97774e7828c0ab7467 by Boudewijn Rempt.
Committed on 04/06/2019 at 07:33.
Pushed by rempt into branch 'master'.

Fix rectangular grid spacing limits incorrect after resizing canvas

Fix grid spacing being limited to half load-time image size.
Removed setGridDivision which was only used to set the spacing spinbox max on image load.
Changed spacing spinbox max to int max.

Patch by Carl Olsson, thanks!

M  +2    -6    plugins/dockers/griddocker/grid_config_widget.cpp
M  +0    -2    plugins/dockers/griddocker/grid_config_widget.h
M  +0    -2    plugins/dockers/griddocker/griddocker_dock.cpp

https://invent.kde.org/kde/krita/commit/2f31a94aea8ce6de0a498a97774e7828c0ab7467
Comment 3 Halla Rempt 2019-06-04 15:21:30 UTC
Git commit 25e89c41f6ba71078015651a5a5b2b40fae6b7bf by Boudewijn Rempt.
Committed on 04/06/2019 at 15:20.
Pushed by rempt into branch 'krita/4.2'.

Fix rectangular grid spacing limits incorrect after resizing canvas

Fix grid spacing being limited to half load-time image size.
Removed setGridDivision which was only used to set the spacing spinbox max on image load.
Changed spacing spinbox max to int max.

Patch by Carl Olsson, thanks!

M  +2    -6    plugins/dockers/griddocker/grid_config_widget.cpp
M  +0    -2    plugins/dockers/griddocker/grid_config_widget.h
M  +0    -2    plugins/dockers/griddocker/griddocker_dock.cpp

https://invent.kde.org/kde/krita/commit/25e89c41f6ba71078015651a5a5b2b40fae6b7bf