]> 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 fc71f85d87a42d6a472ece86ac150c03fae7b481..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,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 *>(bufferview());
-       bv->updateMetrics();
-       bv->buffer().changed();
-       bv->buffer().markDirty();
+       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;