]> git.lyx.org Git - features.git/commitdiff
remove mutable property
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 29 Sep 2008 10:56:45 +0000 (10:56 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 29 Sep 2008 10:56:45 +0000 (10:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26621 a592a061-630c-0410-9148-cb99ea01b6c8

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

index 42255010d99df10bed1cd9186f13beb78eafaac8..9fa34c6c2f45617c9ecd6acb331a2309babe97ea 100644 (file)
@@ -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::params() const
        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 2091e079f8859457fbc7a26f8e5c5b0d6211b04f..25c08240a3e4539353dcb3b637374455a79d457c 100644 (file)
@@ -94,7 +94,7 @@ private:
        ///
        QString alignDefaultLabel_;
        ///
-       mutable ParagraphParameters params_;
+       ParagraphParameters params_;
 };
 
 } // namespace frontend