Monday, November 21, 2016

AbiathRPC - Close, don't save

It's important that AbiathRPC be involved in the process of closing a level set because it needs to update its own bookkeeping to note that it's no longer connected to a server. (And, of course, it should also actually close the connection.) So today I added a part in the "add menu items" event bus stop that attaches an event handler to the Close menu item's Click event. When that runs, AbiathRPC disconnects.

I also noticed that it would be bad if the Save button worked as normal, creating a local copy that wouldn't work because of the lack of real graphics sources. Saving manually is also pointless, since changes are replicated to the server and other clients immediately. Therefore, during the initial connection, AbiathRPC now disables the Save menu item. I made sure it gets re-enabled if the user closes the connected level set and opens a local one.

No comments:

Post a Comment