Skip to content

Commit

Permalink
Bugfix - mouse input only valid for first column in inventory, wrong …
Browse files Browse the repository at this point in the history
…unit of a value in json (#42799)
  • Loading branch information
martinrhan authored Aug 9, 2020
1 parent 92c0ee0 commit 74e3f41
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/inventory_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 74e3f41

Please sign in to comment.