From 422c03b4ecd0597c2f182f2b8a57825b867e107c Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 1 Dec 2009 19:28:45 +0000 Subject: [PATCH] - Fixed 'cancel' button in RSS feed renaming dialog (Thanks Mariusz) --- src/rss_imp.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/rss_imp.cpp b/src/rss_imp.cpp index ede039c53..3c77edcc7 100644 --- a/src/rss_imp.cpp +++ b/src/rss_imp.cpp @@ -322,17 +322,19 @@ void RSSImp::renameFiles() { do { newName = QInputDialog::getText(this, tr("Please choose a new name for this RSS feed"), tr("New feed name:"), QLineEdit::Normal, listStreams->getRSSItem(item)->getName(), &ok); // Check if name is already taken - if(ok && rss_item->getParent()->contains(newName)) { - QMessageBox::warning(0, tr("Name already in use"), tr("This name is already used by another item, please choose another one.")); - ok = false; + if(ok) { + if(rss_item->getParent()->contains(newName)) { + QMessageBox::warning(0, tr("Name already in use"), tr("This name is already used by another item, please choose another one.")); + ok = false; + } + } else { + return; } }while(!ok); - if(ok) { - // Rename item - rss_item->rename(newName); - // Update TreeWidget - updateItemInfos(item); - } + // Rename item + rss_item->rename(newName); + // Update TreeWidget + updateItemInfos(item); } //right-click on stream : refresh it