Skip to content

Commit

Permalink
fix #34506
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Sep 30, 2014
1 parent 6006fb6 commit e9f40af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mscore/textstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ TextStyleDialog::TextStyleDialog(QWidget* parent, Score* score)

textNames->clear();
for (int i = 0, n = styles.size(); i < n; ++i) {
// const TextStyle& s = styles.at(i);
if ( (styles.at(i).hidden()& TextStyleHidden::IN_EDITOR) == 0) {
if ( (styles.at(i).hidden() & TextStyleHidden::IN_EDITOR) == 0) {
int count = textNames->count();
textNames->addItem(qApp->translate("TextStyle", styles.at(i).name().toLatin1().data()));
textNames->item(count)->setData(Qt::UserRole, i);
Expand Down Expand Up @@ -224,8 +223,7 @@ void TextStyleDialog::newClicked()
//
// use current selected style as template
//
QString name = textNames->currentItem()->text();
TextStyle newStyle = cs->textStyle(name);
TextStyle newStyle = styles.at(textNames->currentItem()->data(Qt::UserRole).toInt());
newStyle.setName(s);

int count = textNames->count();
Expand Down

0 comments on commit e9f40af

Please sign in to comment.