From 74e3f4194a2626057458d0586a96403aa9a718d5 Mon Sep 17 00:00:00 2001 From: martinrhan <53336429+martinrhan@users.noreply.github.com> Date: Sun, 9 Aug 2020 14:33:27 +0800 Subject: [PATCH] Bugfix - mouse input only valid for first column in inventory, wrong unit of a value in json (#42799) --- src/inventory_ui.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 16758f7587a23..0cc37aad876c8 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -942,7 +942,6 @@ void inventory_column::draw( const catacurses::window &win, const point &p, }; // Do the actual drawing - rect_entry_map.clear(); for( size_t index = page_offset, line = 0; index < entries.size() && line < entries_per_page; ++index, ++line ) { inventory_entry &entry = entries[index]; @@ -1761,17 +1760,16 @@ void inventory_selector::draw_columns( const catacurses::window &w ) size_t y = get_header_height() + border + 1; size_t active_x = 0; + rect_entry_map.clear(); for( const auto &elem : columns ) { if( &elem == &columns.back() ) { x += gap_rounding_error; } - if( !is_active_column( *elem ) ) { elem->draw( w, point( x, y ), rect_entry_map ); } else { active_x = x; } - x += elem->get_width() + gap; }