Skip to content

Commit

Permalink
Editor: fixed button overlays being missing when loading a map from t…
Browse files Browse the repository at this point in the history
…he cl

Fixes #1969. Reverting d39bbc2 would also have been
an acceptable fix, but see the included comment as to why I went with the chosen method.

Worth noting that the flickering described in the commit above didn't appear even when
the redraw_everything call was restored, but that's not really important.
  • Loading branch information
Vultraz committed Feb 24, 2018
1 parent cc3d736 commit a5c2304
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/editor/editor_main.cpp
Expand Up @@ -40,6 +40,17 @@ EXIT_STATUS start(const config& game_conf, const std::string& filename /* = "" *
editor.context_manager_->load_map_dialog(true);
} else {
editor.context_manager_->load_map(filename, false);

// HACK: this fixes an issue where the button overlays would be missing when
// the loaded map appears. Since we're gonna drop this ridiculous GUI1 drawing
// stuff in 1.15 I'm not going to waste time coming up with a better fix.
//
// Do note adding a redraw_everything call to context_manager::refresh_all also
// fixes the issue, but I'm pretty sure thats just because editor_controller::
// display_redraw_callback gets called, which then calls set_button_state.
//
// -- vultraz, 2018-02-24
editor.set_button_state();
}

if (take_screenshot) {
Expand Down

0 comments on commit a5c2304

Please sign in to comment.