Changed the sense of the 'do_not_muck_with_time' boolean. Let's not have flags with...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 3 Sep 2007 14:29:48 +0000 (14:29 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 3 Sep 2007 14:29:48 +0000 (14:29 +0000)
git-svn-id: http://svn.voria.com/code@576 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp
synfig-core/trunk/src/synfig/layer_pastecanvas.cpp
synfig-core/trunk/src/synfig/layer_pastecanvas.h

index dcb702f..355a738 100644 (file)
@@ -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<Layer_PasteCanvas*>(new_layer.get())->set_do_not_muck_with_time(true);
+                       dynamic_cast<Layer_PasteCanvas*>(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<Layer_PasteCanvas*>(new_layer.get())->set_sub_canvas(sub_canvas);
-                       dynamic_cast<Layer_PasteCanvas*>(new_layer.get())->set_do_not_muck_with_time(false);
+                       dynamic_cast<Layer_PasteCanvas*>(new_layer.get())->set_muck_with_time(true);
                        layer=new_layer;
                }
 
index a769b33..4cfa767 100644 (file)
@@ -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<synfig::Canvas> 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<synfig::Canvas> 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);
        }
index 82cd32d..ad44158 100644 (file)
@@ -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<synfig::Canvas> get_sub_canvas()const { return canvas; }
        void set_sub_canvas(etl::handle<synfig::Canvas> x);