alexzhornyak / ScxmlEditor-Tutorial

ScxmlEditor - powerful tool for creating, editing and debugging scxml files
https://alexzhornyak.github.io/ScxmlEditor-Tutorial/
BSD 3-Clause "New" or "Revised" License
73 stars 13 forks source link

Undo resets changes in appearance #75

Closed EdK-z closed 2 years ago

EdK-z commented 2 years ago

If I "edit appearance" of a transition and change the text, then do other work, then undo anything, the edited appearance resets to its original content. Steps to reproduce: 1) Create two states 2) Create a transition between the states 3) Put a condition in the transition (any text, doesn't really matter) - the transition will show the condition text 4) Edit the appearance of the transition to change the displayed text to something else (just the appearance, not the actual condition) 5) Create two more states 6) Hit undo once Expected: Only the last change (last state added) is removed Actual: Last change is removed and transition appearance resets to show the condition text (edited appearance text is lost)

alexzhornyak commented 2 years ago

Do not edit transition content in appearance. It should be readonly and the next app versions, memo control will be locked for editing

image

Edit either in PropertyInspector, or Double Click on transition and edit in Transition Editor

image

EdK-z commented 2 years ago

The intent is to edit the visual appearance of the object, not the content. For example, I have something like this which contains a long comment. image I don't want to change the content of the condition, I just want it to look like this: image

alexzhornyak commented 2 years ago

https://user-images.githubusercontent.com/18611095/186529213-ba429523-79c3-4599-85f1-65ad3b08de72.mp4

P.S. I don't like comments inside conditions. For example: 'transition as soon as conditions are met' is absolutely useless. Chart must be as most as possible easy for "eye reading". You can create \<comment> node and put there any additional info. Attach it to the state that is a source.

Here is an example: image

EdK-z commented 2 years ago

Ahh, so that's the purpose of the extra fields in properties. Yeah, I'm still trying to figure out the right places to put comments in a way that's most effective. This is just a first-pass, there will be refactoring later anyway, so for now I just want the graphics to show simpler information. Thanks.