diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-07-10 13:19:07 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-10 10:17:50 -0700 |
commit | 37fa2fda03ec39e7099f5cf1f2d5b96d8cd9f2c2 (patch) | |
tree | 076f8a32778a55381ef0b50d0d430b8a30d32cd4 /qt-ui/groupedlineedit.cpp | |
parent | 892381b3ae0a27636b80a15c02167b21cd8e1ccd (diff) | |
download | subsurface-37fa2fda03ec39e7099f5cf1f2d5b96d8cd9f2c2.tar.gz |
Forbid the use of empty strings as tags
Some tags were wrong when the user added two commas, so this patch forbids
the use of a comma when we don't have any tags.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/groupedlineedit.cpp')
-rw-r--r-- | qt-ui/groupedlineedit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/groupedlineedit.cpp b/qt-ui/groupedlineedit.cpp index 25488a95c..28758e02f 100644 --- a/qt-ui/groupedlineedit.cpp +++ b/qt-ui/groupedlineedit.cpp @@ -87,6 +87,8 @@ void GroupedLineEdit::addBlock(int start, int end) block.start = start; block.end = end; block.text = text().mid(start, end - start + 1).remove(',').trimmed(); + if (block.text.isEmpty()) + return; d->blocks.append(block); viewport()->update(); } |