]> git.lyx.org Git - features.git/blobdiff - src/insets/Inset.cpp
shuffle code around
[features.git] / src / insets / Inset.cpp
index 5f0754b8e6f6be25737b5ab71b4ea7cf7c3c96c3..b8e6c7cb5122456f0c1ac42ed105723417e8a294 100644 (file)
@@ -33,6 +33,8 @@
 #include "MetricsInfo.h"
 
 #include "frontends/Painter.h"
+#include "frontends/Application.h"
+#include "frontends/Gui.h"
 
 #include "support/convert.h"
 
 
 namespace lyx {
 
+extern bool quitting;
+
 class InsetName {
 public:
-       InsetName(std::string const & n, InsetCode c)
-               : name(n), code(c) {}
+       InsetName(std::string const & n, InsetCode c) : name(n), code(c) {}
        std::string name;
        InsetCode code;
 };
@@ -382,4 +385,12 @@ void Inset::setDimCache(MetricsInfo const & mi, Dimension const & dim) const
        mi.base.bv->coordCache().insets().add(this, dim);
 }
 
+
+Buffer const * Inset::updateFrontend() const
+{
+       if (quitting)
+               return 0;
+       return theApp()->gui().updateInset(this);
+}
+
 } // namespace lyx