Fix a bug introduced by r590. The name of the paste_canvas later (which was PasteCan...
[synfig.git] / synfig-studio / trunk / src / gtkmm / canvasview.cpp
index 36e9f71..0ad6a31 100644 (file)
@@ -790,7 +790,7 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
 
        // If the canvas is really big, zoom out so that we can fit it all in the window
        /*! \todo In other words, this is a zoom-to-fit, and should be
-       ** in it's own function.
+       ** in its own function.
        */
        int w=get_canvas()->rend_desc().get_w()+70;
        int h=get_canvas()->rend_desc().get_h()+70;
@@ -1305,7 +1305,7 @@ CanvasView::init_menus()
                action=Gtk::Action::create("seek-prev-frame", Gtk::Stock::GO_BACK,_("Prev Frame"),_("Prev Frame"));
                action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame),-1));
 
-               action=Gtk::Action::create("seek-next-second", Gtk::Stock::GO_FORWARD,_("Seek Foward"),_("Seek Foward"));
+               action=Gtk::Action::create("seek-next-second", Gtk::Stock::GO_FORWARD,_("Seek Forward"),_("Seek Forward"));
                action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time(1)));
                action=Gtk::Action::create("seek-prev-second", Gtk::Stock::GO_BACK,_("Seek Backward"),_("Seek Backward"));
                action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time(-1)));
@@ -1718,7 +1718,7 @@ CanvasView::popup_layer_menu(synfig::Layer::Handle layer)
 
        //parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New Layer"),*newlayers));
 
-       if(layer->get_name()=="PasteCanvas")
+       if(layer->get_name()=="paste_canvas")
        {
                menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Children"),
                        sigc::bind(
@@ -2146,7 +2146,7 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
                                build_new_layer_menu(*newlayers);
 
                                parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem("New Layer",*newlayers));
-                               if(!multiple_selected && layer->get_name()=="PasteCanvas")
+                               if(!multiple_selected && layer->get_name()=="paste_canvas")
                                {
                                        parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Children"),
                                                sigc::bind(
@@ -2219,6 +2219,12 @@ CanvasView::on_children_user_click(int button, Gtk::TreeRow row, ChildrenTree::C
                        if(!(bool)row[children_tree_model.is_canvas])
                        {
                                synfigapp::ValueDesc value_desc=row[children_tree_model.value_desc];
+                               if (!value_desc)
+                               {
+                                       //! \todo fix properly -- what is the child dialog for?
+                                       synfig::info("preventing child dialog right-click crash");
+                                       return true;
+                               }
                                assert(value_desc);
                                popup_param_menu(value_desc);
                                return true;
@@ -2620,7 +2626,7 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
 
                // If this is a paste canvas layer, then we need to
                // descend into it
-               if(layer_name=="PasteCanvas")
+               if(layer_name=="paste_canvas")
                {
                        Vector scale;
                        scale[0]=scale[1]=exp(layer->get_param("zoom").get(Real()));