summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-01-17 15:02:33 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-01-17 15:02:33 (GMT)
commita53771b813f8ed5407fcd329fcfc5329d8ebfc22 (patch)
tree3562f8cde95fe997c580e7227cf3176eda1abed6
parentc63d03296286d9738060abbc173b2ae9c8ca427c (diff)
downloadswift-a53771b813f8ed5407fcd329fcfc5329d8ebfc22.zip
swift-a53771b813f8ed5407fcd329fcfc5329d8ebfc22.tar.bz2
Small fix to allow removing list items.
Change-Id: I168644c2271a2212bab3c006077d4b23758d490d
-rw-r--r--Swift/QtUI/QtHighlightEditor.cpp2
-rw-r--r--Swift/QtUI/QtHighlightEditor.ui13
2 files changed, 1 insertions, 14 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp
index 8a27a09..e636b57 100644
--- a/Swift/QtUI/QtHighlightEditor.cpp
+++ b/Swift/QtUI/QtHighlightEditor.cpp
@@ -197,7 +197,7 @@ void QtHighlightEditor::onNewButtonClicked()
void QtHighlightEditor::onDeleteButtonClicked()
{
int selectedRow = getSelectedRow();
- if (selectedRow == -1) {
+ if (selectedRow != -1) {
delete ui_.listWidget->takeItem(selectedRow);
highlightManager_->removeRule(selectedRow);
}
diff --git a/Swift/QtUI/QtHighlightEditor.ui b/Swift/QtUI/QtHighlightEditor.ui
index 0de6ba5..76ccf05 100644
--- a/Swift/QtUI/QtHighlightEditor.ui
+++ b/Swift/QtUI/QtHighlightEditor.ui
@@ -435,19 +435,6 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>268</width>
- <height>22</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
</layout>