Skip to content

event-editor: Fix the "Save" vs "Done" button label's random encounter spawn condition 🎲

The "Done" button was apparently meant for read-only events, while the "Save" action was for everything else. However, it didn't process correctly because the method returned too soon of a mismatch between the UI file definition and the code's default initialization values.

This ensures the correct button labels show up at the correct time.~~ It also hides the "Cancel" button when it is redundant with the "Done" button.~~

I added code comments to ensure no confusion can happen regarding the purpose of these buttons from here on.

Fixes issue #1142 (closed)


This code (and a whole lot of other code) might eventually become obsoleted by !345 if that idea gets accepted and merged someday, but in the meantime this branch fixes up the current code's behavior.

From a theoretical standpoint, I don't understand why the set_writable method's if statement returns early at all though, why doesn't it continue to set the writable property even if not writable? But in any case, my code shuffle works.

Edited by Jeff Fortin

Merge request reports