X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiInfo.cpp;h=cb6c2b549dc87b1d52e85b1516749b95818c941e;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=fc71f85d87a42d6a472ece86ac150c03fae7b481;hpb=f8f5a7b28d4c6fb432055911b81d01505696e66b;p=lyx.git diff --git a/src/frontends/qt4/GuiInfo.cpp b/src/frontends/qt4/GuiInfo.cpp index fc71f85d87..cb6c2b549d 100644 --- a/src/frontends/qt4/GuiInfo.cpp +++ b/src/frontends/qt4/GuiInfo.cpp @@ -87,10 +87,9 @@ void GuiInfo::on_nameLE_textChanged(QString const &) void GuiInfo::applyView() { - InsetInfo const * ii = static_cast(inset(INFO_CODE)); - if (!ii) { + InsetInfo const * ii = dynamic_cast(inset(INFO_CODE)); + if (!ii) return; - } dialogToParams(); docstring const argument = qstring_to_ucs4(type_ + ' ' + name_); @@ -99,17 +98,13 @@ void GuiInfo::applyView() dispatch(FuncRequest(LFUN_INSET_MODIFY, argument)); // FIXME: update the inset contents - bufferview()->buffer().updateLabels(false); - BufferView * bv = const_cast(bufferview()); - bv->updateMetrics(); - bv->buffer().changed(); - bv->buffer().markDirty(); + bufferview()->buffer().updateLabels(); } void GuiInfo::updateView() { - InsetInfo const * ii = static_cast(inset(INFO_CODE)); + InsetInfo const * ii = dynamic_cast(inset(INFO_CODE)); if (!ii) { enableView(false); return;