From 1d5f2296530722acc782748474a18d270c51720e Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Thu, 19 Jun 2014 13:30:01 +0200 Subject: [PATCH] Nasal: set CustomEvent::bubbles. --- src/Scripting/NasalCanvas.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Scripting/NasalCanvas.cxx b/src/Scripting/NasalCanvas.cxx index ee1b3dad1..64619a1d1 100644 --- a/src/Scripting/NasalCanvas.cxx +++ b/src/Scripting/NasalCanvas.cxx @@ -285,6 +285,7 @@ static naRef f_createCustomEvent(const nasal::CallContext& ctx) if( type.empty() ) return naNil(); + bool bubbles = false; simgear::StringMap detail; if( ctx.isHash(1) ) { @@ -292,9 +293,12 @@ static naRef f_createCustomEvent(const nasal::CallContext& ctx) naRef na_detail = cfg.get("detail"); if( naIsHash(na_detail) ) detail = ctx.from_nasal(na_detail); + bubbles = cfg.get("bubbles"); } - return ctx.to_nasal( sc::CustomEventPtr(new sc::CustomEvent(type, detail)) ); + return ctx.to_nasal( + sc::CustomEventPtr(new sc::CustomEvent(type, bubbles, detail)) + ); } struct CustomEventDetailWrapper: -- 2.39.5