Skip to content

Commit

Permalink
ComboBox: invoke damage function
Browse files Browse the repository at this point in the history
Invoke damage function when new items are added or items
are removed from ComboBox.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
[reword commit message]
Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
  • Loading branch information
sandeep2081 authored and joshua-henderson committed Jan 22, 2020
1 parent 82c2409 commit 8c9fce1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/combo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ void ComboBox::add_item(const std::string& item)

if (m_items.size() == 1)
m_selected = 0;

damage();
}

bool ComboBox::remove(const std::string& item)
Expand All @@ -159,6 +161,7 @@ bool ComboBox::remove(const std::string& item)
if (it != m_items.end())
{
m_items.erase(it);
damage();
return true;
}
return false;
Expand Down

0 comments on commit 8c9fce1

Please sign in to comment.