mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
getContext() clears "card" from the context
This commit is contained in:
+2
-2
@@ -55,7 +55,7 @@ Set::~Set() {}
|
||||
|
||||
Context& Set::getContext() {
|
||||
assert(wxThread::IsMain());
|
||||
return script_manager->getContext(stylesheet);
|
||||
return script_manager->getContext(CardP());
|
||||
}
|
||||
Context& Set::getContext(const CardP& card) {
|
||||
assert(wxThread::IsMain());
|
||||
@@ -73,7 +73,7 @@ Context& Set::getContextForThumbnails() {
|
||||
if (!thumbnail_script_context) {
|
||||
thumbnail_script_context.reset(new SetScriptContext(*this));
|
||||
}
|
||||
return thumbnail_script_context->getContext(stylesheet);
|
||||
return thumbnail_script_context->getContext(CardP());
|
||||
}
|
||||
Context& Set::getContextForThumbnails(const CardP& card) {
|
||||
assert(!wxThread::IsMain());
|
||||
|
||||
@@ -80,7 +80,7 @@ Context& SetScriptContext::getContext(const CardP& card) {
|
||||
ctx.setVariable(SCRIPT_VAR_card, to_script(card));
|
||||
ctx.setVariable(SCRIPT_VAR_styling, to_script(&set.stylingDataFor(card)));
|
||||
} else {
|
||||
ctx.setVariable(SCRIPT_VAR_card, script_nil);
|
||||
ctx.setVariable(SCRIPT_VAR_card, ScriptValueP());
|
||||
ctx.setVariable(SCRIPT_VAR_styling, to_script(&set.stylingDataFor(*stylesheet)));
|
||||
}
|
||||
return ctx;
|
||||
|
||||
Reference in New Issue
Block a user