X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Flayertreestore.cpp;h=894563ce30f569a916602ae317bdeb85090479cf;hb=0348d0c0f02151293190a0db10ce92d7b112aa9e;hp=7527cc464b98b2c34c805fee56c222d58798fc0b;hpb=95d1a7b35162a6aeabcf0cf3bc724305c166fa8a;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/layertreestore.cpp b/synfig-studio/trunk/src/gtkmm/layertreestore.cpp index 7527cc4..894563c 100644 --- a/synfig-studio/trunk/src/gtkmm/layertreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/layertreestore.cpp @@ -30,18 +30,19 @@ #endif #include "layertreestore.h" -#include "iconcontroler.h" +#include "iconcontroller.h" #include #include #include #include #include "app.h" #include "instance.h" -#include "iconcontroler.h" #include #include #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -97,7 +98,6 @@ LayerTreeStore::LayerTreeStore(etl::loose_handle can LayerTreeStore::~LayerTreeStore() { synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted"); - } int @@ -158,8 +158,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum g_value_init(value.gobj(),x.value_type()); g_value_copy(x.gobj(),value.gobj()); } - else - if(column==model.z_depth.index()) + else if(column==model.z_depth.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -173,8 +172,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum g_value_init(value.gobj(),x.value_type()); g_value_copy(x.gobj(),value.gobj()); } - else - if(column==model.children_lock.index()) + else if(column==model.children_lock.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -191,8 +189,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum g_value_init(value.gobj(),x.value_type()); g_value_copy(x.gobj(),value.gobj()); } - else - if(column==model.label.index()) + else if(column==model.label.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -211,8 +208,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum //g_value_copy(x.gobj(),value.gobj()); value=x; } - else - if(column==model.tooltip.index()) + else if(column==model.tooltip.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -228,8 +224,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum //g_value_copy(x.gobj(),value.gobj()); value=x; } - else - if(column==model.canvas.index()) + else if(column==model.canvas.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -245,8 +240,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum //g_value_copy(x.gobj(),value.gobj()); value=x; } - else - if(column==model.active.index()) + else if(column==model.active.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -260,8 +254,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum g_value_init(value.gobj(),x.value_type()); g_value_copy(x.gobj(),value.gobj()); } - else - if(column==model.icon.index()) + else if(column==model.icon.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); if(!layer)return; @@ -329,8 +322,7 @@ LayerTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int column, canvas_interface()->get_instance()->perform_action(action); return; } - else - if(column==model.active.index()) + else if(column==model.active.index()) { synfig::Layer::Handle layer((*iter)[model.layer]); @@ -450,13 +442,8 @@ LayerTreeStore::row_drop_possible_vfunc (const TreeModel::Path& dest, const Gtk: //dest_canvas=(Canvas::Handle)(row[model.canvas]); return true; } - else - { - if((bool)const_cast(this)->get_iter(dest_parent)) - return (bool)(Canvas::Handle)(*const_cast(this)->get_iter(dest_parent))[model.contained_canvas]; - else - return false; - } + else if((bool)const_cast(this)->get_iter(dest_parent)) + return (bool)(Canvas::Handle)(*const_cast(this)->get_iter(dest_parent))[model.contained_canvas]; } return false; } @@ -521,9 +508,7 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk continue; if(dest_canvas==src->get_canvas() && src->get_depth()get_canvas()) @@ -540,13 +525,9 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk action->set_param("new_index",dest_layer_depth); action->set_param("dest_canvas",dest_canvas); if(canvas_interface()->get_instance()->perform_action(action)) - { - //DEBUGPOINT(); ret=true; - } else { - //DEBUGPOINT(); passive_grouper.cancel(); return false; } @@ -598,7 +579,7 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk */ } } - synfig::info("I suposidly moved %d layers",i); + synfig::info("I supposedly moved %d layers",i); // Reselect the previously selected layers canvas_interface()->get_selection_manager()->set_selected_layers(selected_layer_list); @@ -606,12 +587,6 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk return ret; } - - - - - - void LayerTreeStore::rebuild() { @@ -741,7 +716,6 @@ LayerTreeStore::set_row_layer(Gtk::TreeRow &row,synfig::Layer::Handle &handle) continue; } - /* etl::handle value_node; if(handle.constant()->dynamic_param_list().count(iter->get_name())) @@ -805,7 +779,6 @@ LayerTreeStore::on_layer_inserted(synfig::Layer::Handle handle,int depth) return; } - Gtk::TreeModel::Children children_(children()); if(canvas_interface()->get_canvas()!=handle->get_canvas()) { @@ -833,7 +806,6 @@ LayerTreeStore::on_layer_inserted(synfig::Layer::Handle handle,int depth) Gtk::TreeModel::Row row(*insert(iter)); set_row_layer(row,handle); - } void