X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiInfo.cpp;h=cb6c2b549dc87b1d52e85b1516749b95818c941e;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=352a36164ce808abb7716e25f0037bd42ad65d15;hpb=53acfb8351e09b1a5c137318b03eb7148613dd7e;p=lyx.git diff --git a/src/frontends/qt4/GuiInfo.cpp b/src/frontends/qt4/GuiInfo.cpp index 352a36164c..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 - updateLabels(bufferview()->buffer()); - 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; @@ -159,4 +154,4 @@ Dialog * createGuiInfo(GuiView & lv) { return new GuiInfo(lv); } } // namespace frontend } // namespace lyx -#include "GuiInfo_moc.cpp" +#include "moc_GuiInfo.cpp"