Skip to content

Commit

Permalink
fixup! Search: avoid search box resize when deleting current item in …
Browse files Browse the repository at this point in the history
…popup
  • Loading branch information
ronso0 committed Feb 6, 2022
1 parent 8b290f8 commit 000667b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/widget/wsearchlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,11 @@ void WSearchLineEdit::deleteSelectedListItem() {
// Also, changing the currentIndex while the popup is visible would cause
// a repaint of the combobox, though without using the padding, which makes
// the combobox shrink in height.
if (view()->currentIndex().row() == currentIndex()) {
int currViewindex = view()->currentIndex().row();
if (currViewindex == findCurrentTextIndex()) {
slotClearSearch();
}
QComboBox::removeItem(view()->currentIndex().row());
QComboBox::removeItem(currViewindex);
// ToDo Resize the list to new item size

// Close the popup if all items were removed
Expand Down

0 comments on commit 000667b

Please sign in to comment.