From: Peter Penz Date: Tue, 5 Oct 2010 16:38:00 +0000 (+0000) Subject: Fix minor regression resulted by the previous commit: The m_newName-member may only... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/3b2cd9c02e9f92fdc670d06c851f306b83d4124a Fix minor regression resulted by the previous commit: The m_newName-member may only get updated after the OK-button has been pressed, otherwise renaming a single file fails. svn path=/trunk/KDE/kdebase/apps/; revision=1182779 --- diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index 7f79b0d43..2b56d928b 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -130,6 +130,7 @@ RenameDialog::~RenameDialog() void RenameDialog::slotButtonClicked(int button) { if (button == KDialog::Ok) { + m_newName = m_lineEdit->text(); renameItems(); } @@ -138,9 +139,7 @@ void RenameDialog::slotButtonClicked(int button) void RenameDialog::slotTextChanged(const QString& newName) { - m_newName = m_lineEdit->text(); - - bool enable = !newName.isEmpty() && (m_renameOneItem ? (newName != m_newName) : newName.contains('#')); + bool enable = !newName.isEmpty(); if (enable) { if (m_renameOneItem) { enable = enable && (newName != m_newName);