mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Merge pull request #12 from haganbmj/stylesheet_settings_underscores
fix: use canonical name for stylesheet settings (fixes #8)
This commit is contained in:
+2
-1
@@ -18,7 +18,8 @@ Features:
|
||||
* Merge String capitilization changes by @SoaringMoon.
|
||||
|
||||
Bug fixes:
|
||||
* Make viewer image rotate button operate clockwise to match dropdown options.
|
||||
* Make viewer image rotate button operate clockwise to match dropdown options. (#9)
|
||||
* Fix storage/retrieval of Stylesheet Settings when the stylesheet name includes spaces. (#8)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
HEAD: new items added as changes are made
|
||||
|
||||
@@ -223,8 +223,10 @@ ColumnSettings& Settings::columnSettingsFor(const Game& game, const Field& field
|
||||
}
|
||||
return cs;
|
||||
}
|
||||
StyleSheetSettings& Settings::stylesheetSettingsFor(const StyleSheet& stylesheet) {
|
||||
StyleSheetSettingsP& ss = stylesheet_settings[stylesheet.name()];
|
||||
StyleSheetSettings& Settings::stylesheetSettingsFor(const StyleSheet& stylesheet) {
|
||||
// Use the canonical form here since the stylesheet name will be used as a stored key.
|
||||
// This does introduce the possibility of collision if two stylesheets return the same value canonically, but I think that's just a necessary risk.
|
||||
StyleSheetSettingsP& ss = stylesheet_settings[canonical_name_form(stylesheet.name())];
|
||||
if (!ss) ss = make_intrusive<StyleSheetSettings>();
|
||||
ss->useDefault(default_stylesheet_settings); // update default settings
|
||||
return *ss;
|
||||
|
||||
Reference in New Issue
Block a user