adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
848 stars 81 forks source link

Fix menu item state for guides and smart guides. #3806

Closed shaoshing closed 8 years ago

shaoshing commented 8 years ago

This PR updates the visibility state of both Guides and Smart Guides menu items, when user turn on one of them (before, we only update the visibility state of the clicked item).

The reason for this change is because, in standard PS, when View > Extra is off and View > Show > Guides/Smart Guides are on, the descriptors that get the visibility state of guids/smart guides will return false. When we run the descriptor to turn on one of them, PS will instead turn on the View > Extra menu item, which makes both Guides and Smart Guides on now. Without this fix, user will see both guides and smart guides on the canvas while the menu items are not both checked.

More discussion is on JIRA PS-1212

baaygun commented 8 years ago

@shaoshing looks good, but I got few comments that may help with performance.

shaoshing commented 8 years ago

Thanks for reviewing @volfied. I've replaced the two PS calls with batchPlay, also replied your comment on moving the nested function. Back to you.