Don't render Attachment Display Settings when `display` is set to `false`. Currently, the value for `display` in the `media.view.AttachmentsBrowser` instance in the `media.view.MediaFrame.Select` frame is set to the value for `displaySettings`.

These values do different things, so check for the existence of `display` on the state before arbitrarily setting it to the `displaySettings` value.

Real world: this hides display settings when you select an image while editing a Gallery.

Fixes #28653.


git-svn-id: https://develop.svn.wordpress.org/trunk@29285 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-07-24 20:57:05 +00:00
parent c2491f31ae
commit b1053cca13
1 changed files with 2 additions and 1 deletions

View File

@ -830,6 +830,7 @@
// Attachments browser defaults. @see media.view.AttachmentsBrowser
searchable: false,
sortable: true,
display: false,
// Initial region modes.
content: 'browse',
toolbar: 'gallery-edit',
@ -2174,7 +2175,7 @@
sortable: state.get('sortable'),
search: state.get('searchable'),
filters: state.get('filterable'),
display: state.get('displaySettings'),
display: state.has('display') ? state.get('display') : state.get('displaySettings'),
dragInfo: state.get('dragInfo'),
suggestedWidth: state.get('suggestedWidth'),