X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiIndices.cpp;h=a1198a68841d6f1d26a326bdbd9fddba09dadee1;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=5ab141c70cd05a376f7e15835510b417515d3204;hpb=eab8801afe8059d3315305bf0ce7f430a9173099;p=lyx.git diff --git a/src/frontends/qt4/GuiIndices.cpp b/src/frontends/qt4/GuiIndices.cpp index 5ab141c70c..a1198a6884 100644 --- a/src/frontends/qt4/GuiIndices.cpp +++ b/src/frontends/qt4/GuiIndices.cpp @@ -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.")); } }