Change Indicator Resets #270
Comments
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. |
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. |
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. |
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. |
Okay. I have an idea how to solve the issue. I'll download the example and see if it resolves it. |
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
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
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. |
I've tested, and both cases are fixed. |
Open a diagram and the related AADL file. Save the diagram. After a few seconds, the asterisk for the diagram reappears.
The text was updated successfully, but these errors were encountered: