]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/renamedialog.cpp
The &-shortcut from another action is not set until the action has been shown at...
[dolphin.git] / src / views / renamedialog.cpp
index 7f79b0d4304dd4d8eda1cd7456701ad869fd19cc..2b56d928be403a9fdbcaed2358d1ee24402b371c 100644 (file)
@@ -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);