Clearing tile inspector clipboard when loading a park

This commit is contained in:
Broxzier 2016-10-30 21:15:31 +01:00
parent 8c54b1208b
commit ecc9637bbd
3 changed files with 7 additions and 0 deletions

View File

@ -899,6 +899,8 @@ void game_load_init()
window_update_all();
gGameSpeed = 1;
window_tile_inspector_clear_clipboard();
}
/**

View File

@ -709,6 +709,7 @@ void window_themes_open();
void window_title_editor_open(int tab);
void window_title_command_editor_open(int command, bool insert);
void window_tile_inspector_open();
void window_tile_inspector_clear_clipboard();
void window_text_input_open(rct_window* call_w, int call_widget, rct_string_id title, rct_string_id description, rct_string_id existing_text, uintptr_t existing_args, int maxLength);
void window_text_input_raw_open(rct_window* call_w, int call_widget, rct_string_id title, rct_string_id description, utf8string existing_text, int maxLength);
rct_window *window_mapgen_open();

View File

@ -579,6 +579,10 @@ void window_tile_inspector_open() {
window_tile_inspector_auto_set_buttons(window);
}
void window_tile_inspector_clear_clipboard() {
windowTileInspectorElementCopied = false;
}
static rct_map_element* window_tile_inspector_get_selected_element(rct_window *w) {
assert(w->selected_list_item >= 0 && w->selected_list_item < windowTileInspectorElementCount);
return map_get_first_element_at(windowTileInspectorTileX, windowTileInspectorTileY) + w->selected_list_item;