]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiIndices.cpp
Handle correctly zero table special arguments.
[lyx.git] / src / frontends / qt4 / GuiIndices.cpp
index ff0639b81d8d501f6d25b609afd1512d03ee67a1..7c7a61014af6decd03a700daf2174ba882a99d86 100644 (file)
@@ -211,9 +211,9 @@ void GuiIndices::on_removePB_pressed()
        if (selItem != 0)
                sel_index = selItem->text(0);
        if (!sel_index.isEmpty()) {
-               if (indiceslist_.find(qstring_to_ucs4(sel_index)) == 
+               if (indiceslist_.find(qstring_to_ucs4(sel_index)) ==
                    indiceslist_.findShortcut(from_ascii("idx"))) {
-                       Alert::error(_("Cannot remove standard index"), 
+                       Alert::error(_("Cannot remove standard index"),
                              _("The default index cannot be removed."));
                              return;
                }
@@ -233,15 +233,14 @@ 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)
-                               Alert::error(_("Renaming failed"), 
+                               Alert::error(_("Renaming failed"),
                                      _("The index could not be renamed. "
                                        "Check if the new name already exists."));
                }