]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiInfo.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiInfo.cpp
index 4a838cc0ac8a367554e85db2627feec3b4c3592f..cb6c2b549dc87b1d52e85b1516749b95818c941e 100644 (file)
@@ -87,10 +87,9 @@ void GuiInfo::on_nameLE_textChanged(QString const &)
 
 void GuiInfo::applyView()
 {
-       InsetInfo const * ii = static_cast<InsetInfo const *>(inset(INFO_CODE));
-       if (!ii) {
+       InsetInfo const * ii = dynamic_cast<InsetInfo const *>(inset(INFO_CODE));
+       if (!ii)
                return;
-       }
        
        dialogToParams();
        docstring const argument = qstring_to_ucs4(type_ + ' ' + name_);
@@ -99,15 +98,13 @@ void GuiInfo::applyView()
 
        dispatch(FuncRequest(LFUN_INSET_MODIFY, argument));
        // FIXME: update the inset contents
-       updateLabels(bufferview()->buffer());
-       bufferview()->updateMetrics();
-       bufferview()->buffer().changed();
+       bufferview()->buffer().updateLabels();
 }
 
 
 void GuiInfo::updateView()
 {
-       InsetInfo const * ii = static_cast<InsetInfo const *>(inset(INFO_CODE));
+       InsetInfo const * ii = dynamic_cast<InsetInfo const *>(inset(INFO_CODE));
        if (!ii) {
                enableView(false);
                return;
@@ -157,4 +154,4 @@ Dialog * createGuiInfo(GuiView & lv) { return new GuiInfo(lv); }
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiInfo_moc.cpp"
+#include "moc_GuiInfo.cpp"