]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiIndices.cpp
Amend f441590c
[lyx.git] / src / frontends / qt4 / GuiIndices.cpp
index ff0639b81d8d501f6d25b609afd1512d03ee67a1..7e166cc581f4a9dcddc2bcb53276778d1c4eb37f 100644 (file)
@@ -233,11 +233,10 @@ void GuiIndices::on_renamePB_clicked()
        if (!sel_index.isEmpty()) {
                docstring newname;
                docstring const oldname = qstring_to_ucs4(sel_index);
-               bool success = false;
                if (Alert::askForText(newname, _("Enter new index name"), oldname)) {
                        if (newname.empty() || oldname == newname)
                                return;
-                       success = indiceslist_.rename(qstring_to_ucs4(sel_index), newname);
+                       bool success = indiceslist_.rename(qstring_to_ucs4(sel_index), newname);
                        newIndexLE->clear();
                        updateView();
                        if (!success)