]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiIndices.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiIndices.cpp
index 5ab141c70cd05a376f7e15835510b417515d3204..a1198a68841d6f1d26a326bdbd9fddba09dadee1 100644 (file)
@@ -123,6 +123,7 @@ void GuiIndices::updateView()
                        indicesTW->setItemSelected(newItem, true);
                }
        }
+       indicesTW->resizeColumnToContents(0);
        bool const have_sel =
                !indicesTW->selectedItems().isEmpty();
        removePB->setEnabled(have_sel);
@@ -209,11 +210,11 @@ void GuiIndices::on_renamePB_clicked()
                        success = indiceslist_.rename(qstring_to_ucs4(sel_index), newname);
                        newIndexLE->clear();
                        updateView();
+                       if (!success)
+                               Alert::error(_("Renaming failed"), 
+                                     _("The index could not be renamed. "
+                                       "Check if the new name already exists."));
                }
-               if (!success)
-                       Alert::error(_("Renaming failed"), 
-                             _("The index could not be renamed. "
-                               "Check if the new name already exists."));
        }
 }