Skip to content
This repository has been archived by the owner. It is now read-only.

Change Indicator Resets #270

Closed
philip-alldredge opened this issue Jan 18, 2018 · 7 comments
Closed

Change Indicator Resets #270

philip-alldredge opened this issue Jan 18, 2018 · 7 comments
Labels
Milestone

Comments

@philip-alldredge
Copy link
Contributor

@philip-alldredge philip-alldredge commented Jan 18, 2018

Open a diagram and the related AADL file. Save the diagram. After a few seconds, the asterisk for the diagram reappears.

@philip-alldredge
Copy link
Contributor Author

@philip-alldredge philip-alldredge commented Jan 23, 2018

A minor fix has been fixed to the dirty behavior to handle the case where the diagram opens in a dirty state. However, I do not believe that is the case here. Unable to reproduce. Closing until it can be reproduced reliably.

@lwrage
Copy link
Contributor

@lwrage lwrage commented Jan 30, 2018

I just saw the same thing when running OSATE from the development environment. Unfortunately on a model that I can't share. The model had a couple of diagrams already. I select a component type in the outline view of the text editor -> create diagram -> no change to diagram config -> diagram editor opens -> ctrl-s to save. Asterisk disappears and reappears after 1-2 seconds.

@lwrage
Copy link
Contributor

@lwrage lwrage commented Jan 30, 2018

Close the diagram (and save diagram because prompted to do so) and reopen by double click on the diagram file: the asterisk is there even though the diagram was just opened and nothing has changed.

@lwrage
Copy link
Contributor

@lwrage lwrage commented Jan 30, 2018

Reproduced with a public model: github repo osate2-gtse, project GTSE-Examples

There's one diagram and as soon as I open it it's marked as dirty. Saving it actually changes the xml content. Close and reopen: it's again marked as dirty. Saving again, xml is the same. Close and reopen: marked as dirty.

Now delete diagram diagram. open ARP4761/advanced/impl/wbs.aadl. Select system wbs in outline -> Open diagram -> confirm new diagram -> accept diag config as is -> ctrl-s save diagram -> wait -> asterisk reappears.

@philip-alldredge
Copy link
Contributor Author

@philip-alldredge philip-alldredge commented Jan 30, 2018

Okay. I have an idea how to solve the issue. I'll download the example and see if it resolves it.

philip-alldredge added a commit that referenced this issue Jan 30, 2018
Replace old dirty diagram detection code with code that listens for
change modifications and sets the flag anytime a change that would be
serialized is made. Fixes #270
philip-alldredge added a commit that referenced this issue Jan 30, 2018
Replace old dirty diagram detection code with code that listens for
change modifications and sets the flag anytime a change that would be
serialized is made. Fixes #270
@philip-alldredge
Copy link
Contributor Author

@philip-alldredge philip-alldredge commented Jan 30, 2018

Thanks for tracking this down.

I believe the issue should be fixed. The new change reworks the way the dirty detection works. The old code was a bit of a hack. The new code is much more straightforward.

Your initial case remains. The XML changes because the diagram wasn't saved after it was created. If the diagram configuration had been customized, it would not be saved because it wasn't saved after the customization. I personally feel that this is acceptable behavior because it should now show as dirty if and only if there has been a change that hasn't been saved.

Reopen if it doesn't solve the issue.

@lwrage
Copy link
Contributor

@lwrage lwrage commented Jan 31, 2018

I've tested, and both cases are fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants