Fix an error on startup that said: "error: canvasview.cpp:445 canvas_view.layer_tree...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 1 Feb 2008 22:54:03 +0000 (22:54 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 1 Feb 2008 22:54:03 +0000 (22:54 +0000)
git-svn-id: http://svn.voria.com/code@1550 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/dock_layers.cpp

index 1a6ec00..0ed3dcc 100644 (file)
@@ -220,7 +220,6 @@ Dock_Layers::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
 
        canvas_view->set_tree_model(get_name(),layer_tree_store);
        LayerTree* layer_tree(new LayerTree());
-       layer_tree->set_model(layer_tree_store);
        layer_tree->set_time_adjustment(canvas_view->time_adjustment());
 
        layer_tree->signal_edited_value().connect(
@@ -229,10 +228,13 @@ Dock_Layers::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
                )
        );
 
-       canvas_view->set_ext_widget(get_name()+"_cmp",layer_tree);
+       // (a) should be before (b), (b) should be before (c)
+       canvas_view->set_ext_widget(get_name()+"_cmp",layer_tree); // (a)
        canvas_view->set_ext_widget(get_name(),&layer_tree->get_layer_tree_view());
        canvas_view->set_ext_widget("params",&layer_tree->get_param_tree_view());
-       canvas_view->set_tree_model("params",layer_tree->get_param_tree_view().get_model());
+
+       layer_tree->set_model(layer_tree_store); // (b)
+       canvas_view->set_tree_model("params",layer_tree->get_param_tree_view().get_model()); // (c)
 
        /*
        canvas_view->layermenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-delete"),Gtk::AccelKey("Delete"),