Removed invalidate_all call from floating_textbox::close
It works perfectly fine without it.
This commit is contained in:
parent
2f3927733d
commit
3301023b8c
4 changed files with 12 additions and 13 deletions
|
@ -38,7 +38,7 @@ namespace gui{
|
|||
command_history_()
|
||||
{}
|
||||
|
||||
void floating_textbox::close(game_display& gui)
|
||||
void floating_textbox::close()
|
||||
{
|
||||
if(!active()) {
|
||||
return;
|
||||
|
@ -52,7 +52,6 @@ namespace gui{
|
|||
check_.reset(nullptr);
|
||||
font::remove_floating_label(label_);
|
||||
mode_ = TEXTBOX_NONE;
|
||||
gui.invalidate_all();
|
||||
}
|
||||
|
||||
void floating_textbox::update_location(game_display& gui)
|
||||
|
@ -109,7 +108,7 @@ namespace gui{
|
|||
void floating_textbox::show(gui::TEXTBOX_MODE mode, const std::string& label,
|
||||
const std::string& check_label, bool checked, game_display& gui)
|
||||
{
|
||||
close(gui);
|
||||
close();
|
||||
|
||||
label_string_ = label;
|
||||
mode_ = mode;
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace gui{
|
|||
const std::unique_ptr<gui::textbox>& box() const { return box_; }
|
||||
const std::vector<std::string>& command_history() const { return command_history_; }
|
||||
|
||||
void close(game_display& gui);
|
||||
void close();
|
||||
void update_location(game_display& gui);
|
||||
void show(gui::TEXTBOX_MODE mode, const std::string& label,
|
||||
const std::string& check_label, bool checked, game_display& gui);
|
||||
|
|
|
@ -1571,7 +1571,7 @@ void console_handler::do_droid()
|
|||
}
|
||||
}
|
||||
}
|
||||
menu_handler_.textbox_info_.close(*menu_handler_.gui_);
|
||||
menu_handler_.textbox_info_.close();
|
||||
}
|
||||
|
||||
void console_handler::do_terrain()
|
||||
|
@ -1628,7 +1628,7 @@ void console_handler::do_idle()
|
|||
}
|
||||
}
|
||||
}
|
||||
menu_handler_.textbox_info_.close(*menu_handler_.gui_);
|
||||
menu_handler_.textbox_info_.close();
|
||||
}
|
||||
|
||||
void console_handler::do_theme()
|
||||
|
@ -1690,7 +1690,7 @@ void console_handler::do_control()
|
|||
}
|
||||
|
||||
menu_handler_.request_control_change(side_num, player);
|
||||
menu_handler_.textbox_info_.close(*(menu_handler_.gui_));
|
||||
menu_handler_.textbox_info_.close();
|
||||
}
|
||||
|
||||
void console_handler::do_controller()
|
||||
|
|
|
@ -635,24 +635,24 @@ void play_controller::enter_textbox()
|
|||
case gui::TEXTBOX_SEARCH:
|
||||
menu_handler_.do_search(str);
|
||||
menu_handler_.get_textbox().memorize_command(str);
|
||||
menu_handler_.get_textbox().close(*gui_);
|
||||
menu_handler_.get_textbox().close();
|
||||
break;
|
||||
case gui::TEXTBOX_MESSAGE:
|
||||
menu_handler_.do_speak();
|
||||
menu_handler_.get_textbox().close(*gui_); // need to close that one after executing do_speak() !
|
||||
menu_handler_.get_textbox().close(); // need to close that one after executing do_speak() !
|
||||
break;
|
||||
case gui::TEXTBOX_COMMAND:
|
||||
menu_handler_.get_textbox().memorize_command(str);
|
||||
menu_handler_.get_textbox().close(*gui_);
|
||||
menu_handler_.get_textbox().close();
|
||||
menu_handler_.do_command(str);
|
||||
break;
|
||||
case gui::TEXTBOX_AI:
|
||||
menu_handler_.get_textbox().memorize_command(str);
|
||||
menu_handler_.get_textbox().close(*gui_);
|
||||
menu_handler_.get_textbox().close();
|
||||
menu_handler_.do_ai_formula(str, team_num, mousehandler);
|
||||
break;
|
||||
default:
|
||||
menu_handler_.get_textbox().close(*gui_);
|
||||
menu_handler_.get_textbox().close();
|
||||
ERR_DP << "unknown textbox mode" << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ bool play_controller::have_keyboard_focus()
|
|||
void play_controller::process_focus_keydown_event(const SDL_Event& event)
|
||||
{
|
||||
if(event.key.keysym.sym == SDLK_ESCAPE) {
|
||||
menu_handler_.get_textbox().close(*gui_);
|
||||
menu_handler_.get_textbox().close();
|
||||
} else if(event.key.keysym.sym == SDLK_TAB) {
|
||||
tab();
|
||||
} else if(event.key.keysym.sym == SDLK_UP) {
|
||||
|
|
Loading…
Add table
Reference in a new issue