Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Use minimum layer size of 1 unless all selected leaves are vectors #3717

Merged
merged 1 commit into from
Feb 18, 2016

Conversation

iwehrman
Copy link
Contributor

We're currently specifying a blanket minimum layers size of 0.1, but that actually only works for vectors or groups that contain only vectors. This PR changes the minimum size to be 1 unless all selected leaf layers are vector layers; in that case, go with the existing minimum size of 0.1.

Addresses #3153.

…r layers; in that case, go with a minimum size of 0.1.
@iwehrman
Copy link
Contributor Author

@ktaki If you have a chance, please test to make sure I didn't screw anything up!

@baaygun
Copy link
Contributor

baaygun commented Feb 17, 2016

LGTM, @ktaki please merge if nothing bad pops out of testing.

@ktaki
Copy link
Contributor

ktaki commented Feb 17, 2016

When W and H values are linked, it is still possible to make <1. Try with a text box layer W=200 and H=600. Link the value, then set H=1. This will result in the W to be less than 1 and reproduce the original issue. In fact, this can be an issue with vector layers also. It is possible to set to the value smaller than 0.1.

@iwehrman
Copy link
Contributor Author

@ktaki I think I'd like to call that a separate bug. I've filed https://jira.corp.adobe.com/browse/PS-1384 to request that Photoshop simply clamp these values to a valid range. The alternative is to recreate some fairly complicated bounds-calculation logic from Photoshop into the front end, which I'd certainly rather not do. I've filed #3725 to capture this.

Back to @Volfied in case he agrees that that can be considered a separate issue which, in my opinion, is equally severe but that users are less likely to encounter the bug that this PR addresses.

@iwehrman iwehrman assigned baaygun and unassigned iwehrman Feb 18, 2016
@baaygun
Copy link
Contributor

baaygun commented Feb 18, 2016

If we're tracking the other issue, I'm ok with merging this one. And yes, this should be fixed in PS and PS should not allow us to set layer size smaller than possible.

baaygun pushed a commit that referenced this pull request Feb 18, 2016
Use minimum layer size of 1 unless all selected leaves are vectors
@baaygun baaygun merged commit a163a25 into master Feb 18, 2016
@baaygun baaygun deleted the iwehrman/issue-3153 branch February 18, 2016 23:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants