mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implement unique IDs and card linking
This commit is contained in:
+6
-11
@@ -38,13 +38,13 @@ StyleSheetP StyleSheet::byGameAndName(const Game& game, const String& name) {
|
||||
}
|
||||
} catch (PackageNotFoundError& e) {
|
||||
queue_message(MESSAGE_ERROR, _("Missing stylesheet: ") + full_name);
|
||||
|
||||
// This causes a freeze when the set contains two cards that use the same missing StyleSheet, and the second one has styling_data
|
||||
// Also, it's probably better to ask the user for an alternative for each missing StyleSheet individually
|
||||
|
||||
// This causes a freeze when the set contains two cards that use the same missing StyleSheet, and the second one has styling_data
|
||||
// Also, it's probably better to ask the user for an alternative for each missing StyleSheet individually
|
||||
//if (stylesheet_for_reading()) {
|
||||
// // we already have a stylesheet higher up, so just return a null pointer
|
||||
// return StyleSheetP();
|
||||
//}
|
||||
//}
|
||||
|
||||
// load an alternative stylesheet
|
||||
StyleSheetP ss = select_stylesheet(game, name);
|
||||
@@ -103,7 +103,7 @@ IMPLEMENT_REFLECTION(StyleSheet) {
|
||||
REFLECT(card_width);
|
||||
REFLECT(card_height);
|
||||
REFLECT(card_dpi);
|
||||
REFLECT(card_background);
|
||||
REFLECT(card_background);
|
||||
REFLECT(card_regions);
|
||||
REFLECT(init_script);
|
||||
// styling
|
||||
@@ -122,12 +122,7 @@ IMPLEMENT_REFLECTION(StyleSheet) {
|
||||
// extra card fields
|
||||
REFLECT(extra_card_fields);
|
||||
REFLECT_IF_READING {
|
||||
if (extra_card_style.init(extra_card_fields)) {
|
||||
// if a value is not editable, don't save it
|
||||
FOR_EACH(f, extra_card_fields) {
|
||||
if (!f->editable) f->save_value = false;
|
||||
}
|
||||
}
|
||||
extra_card_style.init(extra_card_fields);
|
||||
}
|
||||
REFLECT(extra_card_style);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user