Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fixes for header/footer even/odd setting #759

Merged
merged 2 commits into from

2 participants

@Jojo-Schmitz

No description provided.

Jojo-Schmitz added some commits
@Jojo-Schmitz Jojo-Schmitz fix 24491: odd should win over even
when not using the Odd/Even setting, so that every page looks like page
1 looks with the Odd/Even setting
0378b8b
@Jojo-Schmitz Jojo-Schmitz fix 24491: disable even dialog part
when not using the Odd/Even setting
0a8cf7f
@wschweer wschweer merged commit 6a2e41a into musescore:master
@Jojo-Schmitz Jojo-Schmitz deleted the Jojo-Schmitz:24491-header-footer-even-odd-setting branch
@Jojo-Schmitz Jojo-Schmitz restored the Jojo-Schmitz:24491-header-footer-even-odd-setting branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 11, 2014
  1. @Jojo-Schmitz

    fix 24491: odd should win over even

    Jojo-Schmitz authored
    when not using the Odd/Even setting, so that every page looks like page
    1 looks with the Odd/Even setting
  2. @Jojo-Schmitz

    fix 24491: disable even dialog part

    Jojo-Schmitz authored
    when not using the Odd/Even setting
This page is out of date. Refresh to see the latest.
Showing with 49 additions and 3 deletions.
  1. +2 −3 libmscore/page.cpp
  2. +45 −0 mscore/editstyle.cpp
  3. +2 −0  mscore/editstyle.h
View
5 libmscore/page.cpp
@@ -223,7 +223,7 @@ void Page::draw(QPainter* painter) const
TextStyle ts = score()->textStyle(TEXT_STYLE_HEADER);
QPointF o(ts.offset(spatium()));
- bool odd = (n & 1) && _score->styleB(ST_headerOddEven);
+ bool odd = (n & 1) || !_score->styleB(ST_headerOddEven);
if (odd) {
o.setX(-o.x());
s1 = _score->styleSt(ST_oddHeaderL);
@@ -272,8 +272,7 @@ void Page::draw(QPainter* painter) const
QPointF o(ts.offset(spatium()));
- bool odd = (n & 1) && _score->styleB(ST_footerOddEven);
-
+ bool odd = (n & 1) || !_score->styleB(ST_footerOddEven);
if (odd) {
o.setX(-o.x());
s1 = _score->styleSt(ST_oddFooterL);
View
45 mscore/editstyle.cpp
@@ -112,6 +112,8 @@ EditStyle::EditStyle(Score* s, QWidget* parent)
setValues();
connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(buttonClicked(QAbstractButton*)));
+ connect(headerOddEven, SIGNAL(toggled(bool)), SLOT(toggleHeaderOddEven(bool)));
+ connect(footerOddEven, SIGNAL(toggled(bool)), SLOT(toggleFooterOddEven(bool)));
connect(chordDescriptionFileButton, SIGNAL(clicked()), SLOT(selectChordDescriptionFile()));
connect(chordsStandard, SIGNAL(toggled(bool)), SLOT(setChordStyle(bool)));
connect(chordsJazz, SIGNAL(toggled(bool)), SLOT(setChordStyle(bool)));
@@ -622,6 +624,7 @@ void EditStyle::setValues()
headerStyled->setChecked(lstyle.value(ST_headerStyled).toBool());
showHeaderFirstPage->setChecked(lstyle.value(ST_headerFirstPage).toBool());
headerOddEven->setChecked(lstyle.value(ST_headerOddEven).toBool());
+ toggleHeaderOddEven(lstyle.value(ST_headerOddEven).toBool());
if (headerStyled->isChecked()) {
evenHeaderL->setPlainText(lstyle.value(ST_evenHeaderL).toString());
evenHeaderC->setPlainText(lstyle.value(ST_evenHeaderC).toString());
@@ -643,6 +646,7 @@ void EditStyle::setValues()
footerStyled->setChecked(lstyle.value(ST_footerStyled).toBool());
showFooterFirstPage->setChecked(lstyle.value(ST_footerFirstPage).toBool());
footerOddEven->setChecked(lstyle.value(ST_footerOddEven).toBool());
+ toggleFooterOddEven(lstyle.value(ST_footerOddEven).toBool());
if (footerStyled->isChecked()) {
evenFooterL->setPlainText(lstyle.value(ST_evenFooterL).toString());
evenFooterC->setPlainText(lstyle.value(ST_evenFooterC).toString());
@@ -744,6 +748,47 @@ void EditStyle::setChordStyle(bool checked)
}
//---------------------------------------------------------
+// toggleHeaderOddEven
+//---------------------------------------------------------
+
+void EditStyle::toggleHeaderOddEven(bool checked)
+ {
+ label_67->setEnabled(checked); // "Even"
+ if (checked)
+ label_66->setText(tr("Odd"));
+ else
+ label_66->setText(tr("Even/Odd"));
+ evenHeaderL->setEnabled(checked);
+ editEvenHeaderL->setEnabled(checked);
+ evenHeaderC->setEnabled(checked);
+ editEvenHeaderC->setEnabled(checked);
+ evenHeaderR->setEnabled(checked);
+ editEvenHeaderR->setEnabled(checked);
+ return;
+ }
+
+//---------------------------------------------------------
+// toggleFooterOddEven
+//---------------------------------------------------------
+
+void EditStyle::toggleFooterOddEven(bool checked)
+ {
+ label_80->setEnabled(checked); // "Even"
+ if (checked)
+ label_65->setText(tr("Odd"));
+ else
+ label_65->setText(tr("Even/Odd"));
+
+ evenFooterL->setEnabled(checked);
+ editEvenFooterL->setEnabled(checked);
+ evenFooterC->setEnabled(checked);
+ editEvenFooterC->setEnabled(checked);
+ evenFooterR->setEnabled(checked);
+ editEvenFooterR->setEnabled(checked);
+ return;
+ }
+
+//---------------------------------------------------------
// editTextClicked
//---------------------------------------------------------
View
2  mscore/editstyle.h
@@ -49,6 +49,8 @@ class EditStyle : public QDialog, private Ui::EditStyleBase {
private slots:
void selectChordDescriptionFile();
void setChordStyle(bool);
+ void toggleHeaderOddEven(bool);
+ void toggleFooterOddEven(bool);
void buttonClicked(QAbstractButton*);
void editTextClicked(int id);
void resetStyleValue(int i);
Something went wrong with that request. Please try again.