Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> The only difference is that I preserve the efficiency ;-)

And that you have one of these useless and confusing mutable objects.
What about this?

JMarc


svndiff src/frontends/qt4/GuiParagraph.cpp src/frontends/qt4/GuiParagraph.h

Index: src/frontends/qt4/GuiParagraph.cpp
===================================================================
--- src/frontends/qt4/GuiParagraph.cpp	(revision 26618)
+++ src/frontends/qt4/GuiParagraph.cpp	(working copy)
@@ -196,13 +196,7 @@ void GuiParagraph::on_restorePB_clicked(
 
 void GuiParagraph::applyView()
 {
-	if (haveMultiParSelection()) {
-		// FIXME: in case of multi-paragraph selection, it would be nice to
-		// initialise the parameters that are common to all paragraphs.
-		params_ = ParagraphParameters();
-	} else {
-		params_ = bufferview()->cursor().innerParagraph().params();
-	}
+	params_ = params();
 
 	params_.align(getAlignmentFromDialog());
 
@@ -318,8 +312,8 @@ ParagraphParameters const & GuiParagraph
 	if (haveMultiParSelection()) {
 		// FIXME: in case of multi-paragraph selection, it would be nice to
 		// initialise the parameters that are common to all paragraphs.
-		params_ = ParagraphParameters();
-		return params_;
+		static ParagraphParameters empty;
+		return empty;
 	}
 	return bufferview()->cursor().innerParagraph().params();
 }
Index: src/frontends/qt4/GuiParagraph.h
===================================================================
--- src/frontends/qt4/GuiParagraph.h	(revision 26618)
+++ src/frontends/qt4/GuiParagraph.h	(working copy)
@@ -94,7 +94,7 @@ private:
 	///
 	QString alignDefaultLabel_;
 	///
-	mutable ParagraphParameters params_;
+	ParagraphParameters params_;
 };
 
 } // namespace frontend

Reply via email to