adobe-photoshop / spaces-design

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

Menu 'open documents' refresh process should not throw error when there's no active document #3687

Closed mcilroyc closed 8 years ago

mcilroyc commented 8 years ago

When updating the open documents menu list, do not error if no document is set to active in the app store.

When opening several documents simultaneously via the "Open.." menu, the first open event from photoshop is for an inactive document. That event is handled by allocateDocument which causes an updateDocument, which in turn emits an event that will cause the menu items to refresh. At this time, the application store may not be aware of the current document. Previously, in the menu code, the updateOpenDocuments method would throw an error if a current document was not provided. It seems safe to me to relax that requirement, and tolerate the no-active-document situation here.

This is a simple fix for #3679

iwehrman commented 8 years ago

Let's Not Overthink This.