CadetEditor / CadetEditor-as

An editor program for the CadetEngine, based on the CoreEditor framework
https://github.com/CadetEditor/CadetEditor-as/wiki
Other
10 stars 5 forks source link

Undo deselecting textures #4

Open edsilv opened 11 years ago

edsilv commented 11 years ago

In HH, select the plane, change its texture to anything except <no selection>, change back to <no selection>, original plane doesn't come back.

edsilv commented 11 years ago

BTW this is in the Image Skin part of the properties panel.

I think it's a problem because these properties should be disabled. If you try changing rotation or x or y they snap back to their original values, whereas the drop down boxes can be changed.

I think the drop downs should have a disabled state where they can't be changed. Also dragging the rotation slider just for it to snap back is weird.

I think to denote that these properties are out of scope we should do something like darken the labels or something and make the fields completely un-editable.

Or, maybe we shouldn't be showing properties that can't be edited at all...

robsilv commented 11 years ago

The plane is getting it's skin from the TextureAtlas. TextureAtlas and Texture are mutually exclusive values, so selecting a Texture will clear the TextureAtlas. Deselecting the Texture doesn't automatically repopulate the TextureAtlas, as we can't assume this is what the user wants to do.

robsilv commented 11 years ago

It's fine to change the Texture properties on the ImageSkin, it's just the Transform properties of the Skin that are being overridden by the Transform2D sibling.

edsilv commented 11 years ago

So the clearing of the TextureAtlas isn't recorded as an operation? Otherwise, undoing would undo the clear right?

robsilv commented 11 years ago

Ah, you didn't mention undo before. So this is a problem you're experiencing with undo then, rather than changing something, then changing it back in the Properties Inspector?

edsilv commented 11 years ago

Well, I didn't know about the mutual exclusivity of those properties. So I didn't understand why the plane was disappearing. I guess it makes sense, but the fact you can't undo to get the plane back isn't right, surely?