summaryrefslogtreecommitdiffstats
path: root/listeditor.cpp
diff options
context:
space:
mode:
authoram <am@f440f766-f032-0410-8965-dc7d17de2ca0>2009-07-18 17:54:27 +0000
committeram <am@f440f766-f032-0410-8965-dc7d17de2ca0>2009-07-18 17:54:27 +0000
commit80bf76dc318276f67eeec32b8f68e82cf4bb7e62 (patch)
tree262a57a754dcbe01f0a21dd9c69513807be3369b /listeditor.cpp
parenta477a1998c03bc0e7251463aff5486e3c0872d23 (diff)
downloadSheMov-80bf76dc318276f67eeec32b8f68e82cf4bb7e62.tar.gz
SheMov-80bf76dc318276f67eeec32b8f68e82cf4bb7e62.tar.bz2
SheMov-80bf76dc318276f67eeec32b8f68e82cf4bb7e62.zip
Again huge changes (should go on vacation more often :))
-turned archive tab into a QDialog -fixed duplicate handling in ListModel -fixed html output in archive dialog -actually made archiving work -changed covertype to text in database -fixed bug with covertype in coveritem git-svn-id: file:///var/svn/repos2/shemov/trunk@390 f440f766-f032-0410-8965-dc7d17de2ca0
Diffstat (limited to 'listeditor.cpp')
-rw-r--r--listeditor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/listeditor.cpp b/listeditor.cpp
index d3d2caf..df63e15 100644
--- a/listeditor.cpp
+++ b/listeditor.cpp
@@ -45,8 +45,11 @@ void ListEditor::addItem(){
if(mEdit->text().isEmpty()){
return;
}
- QString newItem = mEdit->text().toLower();
- mModel->addItem(newItem);
+ QString newItem = mEdit->text().toLower().trimmed();
+ QModelIndex idx = mModel->index(newItem);
+ if(idx == QModelIndex()){
+ mModel->addItem(newItem);
+ }
}
void ListEditor::removeItem(){