Skip to content

Commit

Permalink
Editor: 'unhide' palette when drawing contents
Browse files Browse the repository at this point in the history
I'm not sure why, but this allows the enabled state of the to be set properly when switching to a tool
with an empty palette. It seems this function is called after editor_toolkit::hotkey_set_mouse_action
is fired, which already seems to do that, so I'm not sure why it doesn't take effect there, but meh.

Also includes a fixup for when palette_menu_button is fetched. It's a menu button not an action button,
but it probably not havig worked before seems not to have affected anything.
  • Loading branch information
Vultraz committed May 2, 2017
1 parent 1000d96 commit e647272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/palette/palette_manager.cpp
Expand Up @@ -136,14 +136,14 @@ void palette_manager::draw_contents()
std::shared_ptr<gui::button> downscroll_button = gui_.find_action_button("downscroll-button-editor");
if (downscroll_button)
downscroll_button->hide(false);
std::shared_ptr<gui::button> palette_menu_button = gui_.find_action_button("menu-editor-terrain");
std::shared_ptr<gui::button> palette_menu_button = gui_.find_menu_button("menu-editor-terrain");
if (palette_menu_button)
palette_menu_button->hide(false);

// bg_restore(loc);
active_palette().set_dirty(true);
active_palette().hide(false);
active_palette().draw();
//active_palette().hide(false);

// set_dirty(false);
}
Expand Down

0 comments on commit e647272

Please sign in to comment.