OK. Thank you, with this code bug 3598 seems harmless enough to fixed
later. :-)

Attached patch fixes 3598 and a more serious bug of framed notes:
color is not required so 'new document, insert->framed note, compile'
would fail.

OK to apply?

Bo
Index: src/insets/InsetNote.cpp
===================================================================
--- src/insets/InsetNote.cpp	(revision 18406)
+++ src/insets/InsetNote.cpp	(working copy)
@@ -150,6 +150,18 @@
 }
 
 
+Inset::DisplayType InsetNote::display() const
+{
+	switch (params_.type) {
+	case InsetNoteParams::Framed:
+	case InsetNoteParams::Shaded:
+		return AlignLeft;
+	default:
+		return Inline;
+	}
+}
+
+
 void InsetNote::write(Buffer const & buf, ostream & os) const
 {
 	params_.write(os);
@@ -353,8 +365,10 @@
 		features.require("color");
 		features.require("framed");
 	}
-	if (params_.type == InsetNoteParams::Framed)
+	if (params_.type == InsetNoteParams::Framed) {
+		features.require("color");
 		features.require("framed");
+	}
 	InsetText::validate(features);
 }
 
Index: src/insets/InsetNote.h
===================================================================
--- src/insets/InsetNote.h	(revision 18406)
+++ src/insets/InsetNote.h	(working copy)
@@ -53,6 +53,8 @@
 	Inset::Code lyxCode() const { return Inset::NOTE_CODE; }
 	///
 	docstring name() const { return from_ascii("Note"); }
+	/// framed and shaded notes are displayed
+	virtual DisplayType display() const;
 	///
 	void write(Buffer const &, std::ostream &) const;
 	///

Reply via email to