From 106526817f753cdd680c783fc58968d5111d16eb Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Thu, 21 Dec 2017 23:48:03 +0100 Subject: [PATCH 1/1] Fix an issue where empty elements were shown in the highlight list - Replace clearContents with while (rowCount()) removeRow --- src/qtui/settingspages/corehighlightsettingspage.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qtui/settingspages/corehighlightsettingspage.cpp b/src/qtui/settingspages/corehighlightsettingspage.cpp index 3a6d6eb0..242c3181 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.cpp +++ b/src/qtui/settingspages/corehighlightsettingspage.cpp @@ -308,7 +308,9 @@ void CoreHighlightSettingsPage::emptyHighlightTable() if (ui.highlightTable->rowCount() != highlightList.size()) { qDebug() << "something is wrong: ui.highlight and highlightList don't have the same size!"; } - ui.highlightTable->clearContents(); + while (ui.highlightTable->rowCount()) { + ui.highlightTable->removeRow(0); + } highlightList.clear(); } @@ -318,7 +320,9 @@ void CoreHighlightSettingsPage::emptyIgnoredTable() if (ui.ignoredTable->rowCount() != ignoredList.size()) { qDebug() << "something is wrong: ui.highlight and highlightList don't have the same size!"; } - ui.ignoredTable->clearContents(); + while (ui.ignoredTable->rowCount()) { + ui.ignoredTable->removeRow(0); + } ignoredList.clear(); } -- 2.20.1