Closed angstsmurf closed 1 year ago
I instead fixed the two places where the settings were being flagged as having changed when they shouldn't have.
Not sure if you'll see this, but there is still a settingsHaveChanged
call in IFCompilerSettings.m which marks the document as edited when opening the Testing tab.
Thanks, I'll remove that soon.
Actually this is a weird one. The first 10 times you go to the testing tab for a new project, it shows a welcome message introducing the testing tab. So the project has to keep track of the number of times it is shown:
Fair enough.
I suppose the long-term sensible solution is to implement autosaving, as per Andrew Plotkin's suggestion in the Jira issue.
When a document is opened, its change count is immediately incremented, which is obviously incorrect, because it just opened and has no changes. This is annoying, because trying to close the project or quitting Inform right after it has opened will throw up an "Are you sure?" dialog.
What happens is that the delegate method
[IFSkeinPage didResizeSplitView]
is called when the window is opened, which calls[IFSkeinPage setTestingTabHelpShownSetting:]
, which calls[IFCompilerSettings setTestingTabHelpShown:]
, which calls[IFCompilerSettings settingsHaveChanged]
, which issues aIFSettingNotification
that[IFProjectController updateSettings]
responds to, marking the document as edited.I'm not sure which of these if any should be considered a bug and should be changed, or how, but fortunately we can just set the document as unedited instead in the
windowDidBecomeMain
method, the first time it is called after loading.See bug I7-1845.