Skip to content

Commit

Permalink
Fix #20915 - Weird behaviour of "Reset to default" buttons in "Prefer…
Browse files Browse the repository at this point in the history
…ence | Shortcuts"

The loadDefaultShortcuts() function in mscore/shortcut.cpp was not populating the list it returns.

Also:
- Made labels for "Reset to Default" buttons more explicit.
- Added (temporarily?) support for the <code> tag to loadDefaultShortcuts(), until the patch with "NumPad" support is merged (pull request 315), which makes the <code> tag obsolete.
  • Loading branch information
Maurizio M. Gavioli committed Apr 29, 2013
1 parent 349d326 commit f17f02c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mscore/prefsdialog.ui
Expand Up @@ -34,7 +34,7 @@
<item>
<widget class="QPushButton" name="resetToDefault">
<property name="text">
<string>Reset to Default</string>
<string>Reset All Preferences to Default</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -2661,7 +2661,7 @@
<item>
<widget class="QPushButton" name="resetShortcut">
<property name="text">
<string>Reset to Default</string>
<string>Reset Shortcut to Default</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion mscore/shortcut.cpp
Expand Up @@ -474,7 +474,6 @@ static QList<Shortcut1*> loadDefaultShortcuts()
return list;
}
XmlReader e(&f);
QString key;
while (e.readNextStartElement()) {
if (e.name() == "Shortcuts") {
while (e.readNextStartElement()) {
Expand All @@ -493,6 +492,7 @@ static QList<Shortcut1*> loadDefaultShortcuts()
else
e.unknown();
}
list.append(sc);
}
else
e.unknown();
Expand Down

0 comments on commit f17f02c

Please sign in to comment.