diff --git a/lacci/lib/shoes/drawable.rb b/lacci/lib/shoes/drawable.rb index fb78417d..edc8b0f1 100644 --- a/lacci/lib/shoes/drawable.rb +++ b/lacci/lib/shoes/drawable.rb @@ -242,15 +242,17 @@ def shoes_style_name?(name) # not kept long, and used up when used once. def with_current_app(app) - old_app = Thread.current[:shoes_app] - Thread.current[:shoes_app] = app - yield - ensure - Thread.current[:shoes_app] = old_app + old_cur_app = @current_app + @current_app = app + ret = yield + @current_app = old_cur_app + ret end def use_current_app - Thread.current[:shoes_app] + cur_app = @current_app + @current_app = nil + cur_app end end