]> git.mxchange.org Git - flightgear.git/commitdiff
Nasal: set CustomEvent::bubbles.
authorThomas Geymayer <tomgey@gmail.com>
Thu, 19 Jun 2014 11:30:01 +0000 (13:30 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Fri, 20 Jun 2014 22:24:57 +0000 (00:24 +0200)
src/Scripting/NasalCanvas.cxx

index ee1b3dad19ffe2ab0b54fd2b273828b7e6e574f5..64619a1d194b01c16d05ef475ee4af99d44fac3a 100644 (file)
@@ -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<simgear::StringMap>(na_detail);
+    bubbles = cfg.get<bool>("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: