From 493e279ad4100cd467b906fd8b3eb106b2cef428 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 3 Sep 2007 14:29:48 +0000 Subject: [PATCH] Changed the sense of the 'do_not_muck_with_time' boolean. Let's not have flags with negative names! git-svn-id: http://svn.voria.com/code@576 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/canvas.cpp | 4 ++-- synfig-core/trunk/src/synfig/layer_pastecanvas.cpp | 8 ++++---- synfig-core/trunk/src/synfig/layer_pastecanvas.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp index dcb702f..355a738 100644 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ b/synfig-core/trunk/src/synfig/canvas.cpp @@ -1077,12 +1077,12 @@ synfig::optimize_layers(Context context, Canvas::Handle op_canvas) }catch(int) { } #endif Layer::Handle new_layer(Layer::create("PasteCanvas")); - dynamic_cast(new_layer.get())->set_do_not_muck_with_time(true); + dynamic_cast(new_layer.get())->set_muck_with_time(false); Layer::ParamList param_list(paste_canvas->get_param_list()); //param_list.erase("canvas"); new_layer->set_param_list(param_list); dynamic_cast(new_layer.get())->set_sub_canvas(sub_canvas); - dynamic_cast(new_layer.get())->set_do_not_muck_with_time(false); + dynamic_cast(new_layer.get())->set_muck_with_time(true); layer=new_layer; } diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp index a769b33..4cfa767 100644 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp +++ b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp @@ -84,7 +84,7 @@ Layer_PasteCanvas::Layer_PasteCanvas(): time_offset(0) { children_lock=false; - do_not_muck_with_time_=false; + muck_with_time_=true; curr_time=Time::begin(); } @@ -163,7 +163,7 @@ Layer_PasteCanvas::set_param(const String & param, const ValueBase &value) void Layer_PasteCanvas::set_sub_canvas(etl::handle x) { - if(canvas && !do_not_muck_with_time_) + if(canvas && muck_with_time_) remove_child(canvas.get()); if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) @@ -184,7 +184,7 @@ Layer_PasteCanvas::set_sub_canvas(etl::handle x) if(canvas) bounds=(canvas->get_context().get_full_bounding_rect()-canvas->rend_desc().get_focus())*exp(zoom)+origin+canvas->rend_desc().get_focus(); - if(canvas && !do_not_muck_with_time_) + if(canvas && muck_with_time_) add_child(canvas.get()); if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) @@ -290,7 +290,7 @@ Layer_PasteCanvas::accelerated_render(Context context,Surface *surface,int quali if(!canvas || !get_amount()) return context.accelerated_render(surface,quality,renddesc,cb); - if(!do_not_muck_with_time_ && curr_time!=Time::begin() && canvas->get_time()!=curr_time+time_offset) + if(muck_with_time_ && curr_time!=Time::begin() && canvas->get_time()!=curr_time+time_offset) { canvas->set_time(curr_time+time_offset); } diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.h b/synfig-core/trunk/src/synfig/layer_pastecanvas.h index 82cd32d..ad44158 100644 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.h +++ b/synfig-core/trunk/src/synfig/layer_pastecanvas.h @@ -64,7 +64,7 @@ private: bool optimize_layers(synfig::Context context,synfig::CanvasBase&)const; - bool do_not_muck_with_time_; + bool muck_with_time_; bool children_lock; @@ -75,7 +75,7 @@ public: virtual void on_canvas_set(); - void set_do_not_muck_with_time(bool x=true) { do_not_muck_with_time_=true; } + void set_muck_with_time(bool x=false) { muck_with_time_=false; } etl::handle get_sub_canvas()const { return canvas; } void set_sub_canvas(etl::handle x); -- 2.7.4