]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
This optional argument to the InsetCollapsable constructor
[lyx.git] / src / insets / Inset.cpp
index ce754bd1fc53b92d45b78417b55a45b576f25e5b..40f33d9fd11d540d405ec1dc525abbd4610f0a3f 100644 (file)
 #include "Text.h"
 #include "TextClass.h"
 
-#include "frontends/Painter.h"
 #include "frontends/Application.h"
+#include "frontends/Painter.h"
 
-#include "support/lassert.h"
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/ExceptionMessage.h"
 #include "support/gettext.h"
+#include "support/lassert.h"
 
 #include <map>
 
@@ -94,7 +94,6 @@ static TranslatorMap const build_translator()
                InsetName("index_print", INDEX_PRINT_CODE),
                InsetName("nomencl_print", NOMENCL_PRINT_CODE),
                InsetName("optarg", OPTARG_CODE),
-               InsetName("environment", ENVIRONMENT_CODE),
                InsetName("newline", NEWLINE_CODE),
                InsetName("line", LINE_CODE),
                InsetName("branch", BRANCH_CODE),
@@ -151,7 +150,7 @@ Buffer const & Inset::buffer() const
 
 bool Inset::isBufferValid() const
 {
-       return theBufferList().isLoaded(buffer_);
+       return buffer_ && theBufferList().isLoaded(buffer_);
 }
 
 
@@ -431,7 +430,7 @@ void Inset::dump() const
 
 ColorCode Inset::backgroundColor() const
 {
-       return Color_background;
+       return Color_none;
 }