{"action":"created","issue":{"url":"https://api.github.com/repos/fesch/Structorizer.Desktop/issues/103","labels_url":"https://api.github.com/repos/fesch/Structorizer.Desktop/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/fesch/Structorizer.Desktop/issues/103/comments","events_url":"https://api.github.com/repos/fesch/Structorizer.Desktop/issues/103/events","html_url":"https://github.com/fesch/Structorizer.Desktop/issues/103","id":126057354,"number":103,"title":"The normal save button should be disabled while no change is recorded","user":{"login":"codemanyak","id":15326471,"avatar_url":"https://avatars.githubusercontent.com/u/15326471?v=3","gravatar_id":"","url":"https://api.github.com/users/codemanyak","html_url":"https://github.com/codemanyak","followers_url":"https://api.github.com/users/codemanyak/followers","following_url":"https://api.github.com/users/codemanyak/following{/other_user}","gists_url":"https://api.github.com/users/codemanyak/gists{/gist_id}","starred_url":"https://api.github.com/users/codemanyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemanyak/subscriptions","organizations_url":"https://api.github.com/users/codemanyak/orgs","repos_url":"https://api.github.com/users/codemanyak/repos","events_url":"https://api.github.com/users/codemanyak/events{/privacy}","received_events_url":"https://api.github.com/users/codemanyak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fesch/Structorizer.Desktop/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"codemanyak","id":15326471,"avatar_url":"https://avatars.githubusercontent.com/u/15326471?v=3","gravatar_id":"","url":"https://api.github.com/users/codemanyak","html_url":"https://github.com/codemanyak","followers_url":"https://api.github.com/users/codemanyak/followers","following_url":"https://api.github.com/users/codemanyak/following{/other_user}","gists_url":"https://api.github.com/users/codemanyak/gists{/gist_id}","starred_url":"https://api.github.com/users/codemanyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemanyak/subscriptions","organizations_url":"https://api.github.com/users/codemanyak/orgs","repos_url":"https://api.github.com/users/codemanyak/repos","events_url":"https://api.github.com/users/codemanyak/events{/privacy}","received_events_url":"https://api.github.com/users/codemanyak/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-01-11T22:56:59Z","updated_at":"2016-01-11T23:00:17Z","closed_at":null,"body":"Since the **save** button (and equivalently the **save** menu item) won't do anything if the hasChanged flag of the diagram root isn't set, it would be better if the button weren't enabled in this case.\r\nIdeally, this is to be combined with the undo and redo stacks. Then the user might see from the visibility of the save button whether or not there are unsaved changes, Since the Structorizer does not wipe the undo list on saving (I wouldn't necessarily change that), it will not be as simple as checking for an empty undo stack. Instead, we might record the undo stack size on saving. This would have the following implications:\r\n\r\n1. The diagram is unchanged w.r.t. the most recently saved version if current undo stack size equals the stored one.\r\n2. This stored level may be reached (a) by undoing actions after the most recent save or (b) by redoing previously undone changes that had occurred before the most recent save.\r\n3. As soon as we apply an undoable change, the redo stack will generally get cleared. So if this happens while the current undo stack level is lower than the one recorded on last saving, the saved version's copy on the redo stack gets lost. Hence, we cannot navigate to the unchanged state anymore and must set the recorded undo stack level to an unreachable value, e.g. -1.\r\n4. So far so relatively clear. But to make things more complicated, there are some global settings that are registered as diagram modification without being undoable (like the diagram type property - program/function - or the \"nice\" property - frame or just header). These will set a hasChanged flag as before but this hasChanged flag will only be an additional marker next to the undo stack level criterion, both combined with OR."},"comment":{"url":"https://api.github.com/repos/fesch/Structorizer.Desktop/issues/comments/170725144","html_url":"https://github.com/fesch/Structorizer.Desktop/issues/103#issuecomment-170725144","issue_url":"https://api.github.com/repos/fesch/Structorizer.Desktop/issues/103","id":170725144,"user":{"login":"codemanyak","id":15326471,"avatar_url":"https://avatars.githubusercontent.com/u/15326471?v=3","gravatar_id":"","url":"https://api.github.com/users/codemanyak","html_url":"https://github.com/codemanyak","followers_url":"https://api.github.com/users/codemanyak/followers","following_url":"https://api.github.com/users/codemanyak/following{/other_user}","gists_url":"https://api.github.com/users/codemanyak/gists{/gist_id}","starred_url":"https://api.github.com/users/codemanyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemanyak/subscriptions","organizations_url":"https://api.github.com/users/codemanyak/orgs","repos_url":"https://api.github.com/users/codemanyak/repos","events_url":"https://api.github.com/users/codemanyak/events{/privacy}","received_events_url":"https://api.github.com/users/codemanyak/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T23:00:17Z","updated_at":"2016-01-11T23:00:17Z","body":"I'm working on it."}}