]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBranch.cpp
Some improvements to the graphics dialog
[lyx.git] / src / frontends / qt4 / GuiBranch.cpp
index 3124314401dda7abec6f6fe49b38774a64330b9e..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,15 +56,25 @@ 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));
 }
 
+
+bool GuiBranch::checkWidgets(bool readonly) const
+{
+       branchCO->setEnabled(!readonly);
+       invertedCB->setEnabled(!readonly);
+       return InsetParamsWidget::checkWidgets();
+}
+
+
 } // namespace frontend
 } // namespace lyx