]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBranch.cpp
Enable OK/Apply buttons when resetting to class defaults.
[lyx.git] / src / frontends / qt4 / GuiBranch.cpp
index c3629051155f3e5d6ef61cb0056568405354250c..24b6977390101ee03e43ccf8316f0015ced405c9 100644 (file)
@@ -33,6 +33,7 @@ GuiBranch::GuiBranch(QWidget * parent) : InsetParamsWidget(parent)
 {
        setupUi(this);
        connect(branchCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
+       connect(invertedCB, SIGNAL(clicked()), this, SIGNAL(changed()));
 }
 
 
@@ -55,12 +56,13 @@ void GuiBranch::paramsToDialog(Inset const * inset)
                        id = count;
        }
        branchCO->setCurrentIndex(id);
+       invertedCB->setChecked(ib->params().inverted);
 }
 
 
 docstring GuiBranch::dialogToParams() const
 {
-       InsetBranchParams params(qstring_to_ucs4(branchCO->currentText()));
+       InsetBranchParams params(qstring_to_ucs4(branchCO->currentText()), invertedCB->isChecked());
        return from_utf8(InsetBranch::params2string(params));
 }
 
@@ -68,6 +70,7 @@ docstring GuiBranch::dialogToParams() const
 bool GuiBranch::checkWidgets(bool readonly) const
 {
        branchCO->setEnabled(!readonly);
+       invertedCB->setEnabled(!readonly);
        return InsetParamsWidget::checkWidgets();
 }