]> git.lyx.org Git - lyx.git/commitdiff
GuiDocument.cpp: commit missing part
authorUwe Stöhr <uwestoehr@lyx.org>
Sat, 8 Apr 2017 00:16:05 +0000 (02:16 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Sat, 8 Apr 2017 00:16:05 +0000 (02:16 +0200)
This should have been committed with the previous commit but failed for an unknown reason.

src/frontends/qt4/GuiDocument.cpp

index ef068176324138b2711d12d10ecfac4405b819ea..433b84c7f1f1a547bfb7cb33e12bba384fe030a6 100644 (file)
@@ -725,6 +725,21 @@ GuiDocument::GuiDocument(GuiView & lv)
        connect(textLayoutModule->justCB, SIGNAL(clicked()),
                this, SLOT(change_adaptor()));
 
+       connect(textLayoutModule->FormulaIndentCB, SIGNAL(toggled(bool)),
+               this, SLOT(change_adaptor()));
+       connect(textLayoutModule->FormulaIndentLE, SIGNAL(textChanged(const QString &)),
+               this, SLOT(change_adaptor()));
+       connect(textLayoutModule->FormulaIndentCO, SIGNAL(activated(int)),
+               this, SLOT(change_adaptor()));
+
+       textLayoutModule->FormulaIndentLE->setValidator(new LengthValidator(
+               textLayoutModule->FormulaIndentLE));
+       // initialize the length validator
+       bc().addCheckedLineEdit(textLayoutModule->FormulaIndentLE);
+       
+       // LaTeX's default for FormulaIndent is 30pt
+       textLayoutModule->FormulaIndentCO->setCurrentItem(Length::PT);
+
        textLayoutModule->lspacingLE->setValidator(new QDoubleValidator(
                textLayoutModule->lspacingLE));
        textLayoutModule->indentLE->setValidator(new LengthValidator(
@@ -1259,20 +1274,6 @@ GuiDocument::GuiDocument(GuiView & lv)
                this, SLOT(change_adaptor()));
        connect(mathsModule->allPackagesNotPB, SIGNAL(clicked()),
                this, SLOT(change_adaptor()));
-       connect(mathsModule->FormulaIndentGB, SIGNAL(toggled(bool)),
-               this, SLOT(change_adaptor()));
-       connect(mathsModule->FormulaIndentLE, SIGNAL(textChanged(const QString &)),
-               this, SLOT(change_adaptor()));
-       connect(mathsModule->FormulaIndentCO, SIGNAL(activated(int)),
-               this, SLOT(change_adaptor()));
-
-       mathsModule->FormulaIndentLE->setValidator(new LengthValidator(
-               mathsModule->FormulaIndentLE));
-       // initialize the length validator
-       bc().addCheckedLineEdit(mathsModule->FormulaIndentLE);
-       
-       // LaTeX's default for FormulaIndent is 30pt
-       mathsModule->FormulaIndentCO->setCurrentItem(Length::PT);
        
 
        // latex class
@@ -2887,15 +2888,15 @@ void GuiDocument::applyView()
                if (rb->isChecked())
                        bp_.use_package(it->first, BufferParams::package_off);
        }
-       bp_.is_formula_indent = mathsModule->FormulaIndentGB->isChecked();
+       bp_.is_formula_indent = textLayoutModule->FormulaIndentCB->isChecked();
        // if formulas are indented
        if (bp_.is_formula_indent) {
                // fill value if empty to avoid LaTeX errors
-               if (mathsModule->FormulaIndentLE->text().isEmpty())
-                       mathsModule->FormulaIndentLE->setText("0");
+               if (textLayoutModule->FormulaIndentLE->text().isEmpty())
+                       textLayoutModule->FormulaIndentLE->setText("0");
                HSpace FormulaIndentation = HSpace(
-                               widgetsToLength(mathsModule->FormulaIndentLE,
-                               mathsModule->FormulaIndentCO)
+                               widgetsToLength(textLayoutModule->FormulaIndentLE,
+                               textLayoutModule->FormulaIndentCO)
                                );
                        bp_.setFormulaIndentation(FormulaIndentation);
        }
@@ -3352,11 +3353,11 @@ void GuiDocument::paramsToDialog()
 
        // math
        if (bp_.is_formula_indent) {
-               mathsModule->FormulaIndentGB->setChecked(bp_.is_formula_indent);
+               textLayoutModule->FormulaIndentCB->setChecked(bp_.is_formula_indent);
                string FormulaIndentation = bp_.getFormulaIndentation().asLyXCommand();
                if (!FormulaIndentation.empty()) {
-                       lengthToWidgets(mathsModule->FormulaIndentLE,
-                       mathsModule->FormulaIndentCO,
+                       lengthToWidgets(textLayoutModule->FormulaIndentLE,
+                       textLayoutModule->FormulaIndentCO,
                        FormulaIndentation, default_unit);
                }
        }