Skip to content

Traffic light buttons reset their positions when NSDocument becomes edited. #91

@beefon

Description

@beefon

In document app, if the NSDocument becomes edited and "– Edited" label appears in title bar, the position of the traffic light buttons reset to default.

You can check this issue by sending updateChangeCount:NSChangeDiscardable message.

When this happens, no notification is being sent. hasUnautosavedChanges/isDocumentEdited are not KVO observable.

I can't find the workaround to resolve this issue. The only chance to do this without going into Private API is to override updateChangeCount: method and update titlebar's layout from this.

The other option is to re-layout title bar from within drawRect: (since system redraws it), but this solution is ugly.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions