mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37: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() {
|
Context& Set::getContext() {
|
||||||
assert(wxThread::IsMain());
|
assert(wxThread::IsMain());
|
||||||
return script_manager->getContext(stylesheet);
|
return script_manager->getContext(CardP());
|
||||||
}
|
}
|
||||||
Context& Set::getContext(const CardP& card) {
|
Context& Set::getContext(const CardP& card) {
|
||||||
assert(wxThread::IsMain());
|
assert(wxThread::IsMain());
|
||||||
@@ -73,7 +73,7 @@ Context& Set::getContextForThumbnails() {
|
|||||||
if (!thumbnail_script_context) {
|
if (!thumbnail_script_context) {
|
||||||
thumbnail_script_context.reset(new SetScriptContext(*this));
|
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) {
|
Context& Set::getContextForThumbnails(const CardP& card) {
|
||||||
assert(!wxThread::IsMain());
|
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_card, to_script(card));
|
||||||
ctx.setVariable(SCRIPT_VAR_styling, to_script(&set.stylingDataFor(card)));
|
ctx.setVariable(SCRIPT_VAR_styling, to_script(&set.stylingDataFor(card)));
|
||||||
} else {
|
} else {
|
||||||
ctx.setVariable(SCRIPT_VAR_card, script_nil);
|
ctx.setVariable(SCRIPT_VAR_card, ScriptValueP());
|
||||||
ctx.setVariable(SCRIPT_VAR_styling, to_script(&set.stylingDataFor(*stylesheet)));
|
ctx.setVariable(SCRIPT_VAR_styling, to_script(&set.stylingDataFor(*stylesheet)));
|
||||||
}
|
}
|
||||||
return ctx;
|
return ctx;
|
||||||
|
|||||||
Reference in New Issue
Block a user