mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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.
|
* Merge String capitilization changes by @SoaringMoon.
|
||||||
|
|
||||||
Bug fixes:
|
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
|
HEAD: new items added as changes are made
|
||||||
|
|||||||
@@ -223,8 +223,10 @@ ColumnSettings& Settings::columnSettingsFor(const Game& game, const Field& field
|
|||||||
}
|
}
|
||||||
return cs;
|
return cs;
|
||||||
}
|
}
|
||||||
StyleSheetSettings& Settings::stylesheetSettingsFor(const StyleSheet& stylesheet) {
|
StyleSheetSettings& Settings::stylesheetSettingsFor(const StyleSheet& stylesheet) {
|
||||||
StyleSheetSettingsP& ss = stylesheet_settings[stylesheet.name()];
|
// 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>();
|
if (!ss) ss = make_intrusive<StyleSheetSettings>();
|
||||||
ss->useDefault(default_stylesheet_settings); // update default settings
|
ss->useDefault(default_stylesheet_settings); // update default settings
|
||||||
return *ss;
|
return *ss;
|
||||||
|
|||||||
Reference in New Issue
Block a user