From 2349d242e18afb3d3f440dba872cb7b5b40e7096 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 1 Feb 2008 22:54:03 +0000 Subject: [PATCH] Fix an error on startup that said: "error: canvasview.cpp:445 canvas_view.layer_tree not defined!?" by making the layer tree before attempting to look up the selected layers in it. git-svn-id: http://svn.voria.com/code@1550 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/dock_layers.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dock_layers.cpp b/synfig-studio/trunk/src/gtkmm/dock_layers.cpp index 1a6ec00..0ed3dcc 100644 --- a/synfig-studio/trunk/src/gtkmm/dock_layers.cpp +++ b/synfig-studio/trunk/src/gtkmm/dock_layers.cpp @@ -220,7 +220,6 @@ Dock_Layers::init_canvas_view_vfunc(etl::loose_handle 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 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"), -- 2.7.4