**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
LayerGroupTreeStore::~LayerGroupTreeStore()
{
//clear();
- synfig::info("LayerGroupTreeStore::~LayerGroupTreeStore(): Deleted");
+
+ if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+ synfig::info("LayerGroupTreeStore::~LayerGroupTreeStore(): Deleted");
}
bool
if(new_desc==layer->get_description())
return;
- synfigapp::Action::Handle action(synfigapp::Action::create("layer_set_desc"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("LayerSetDesc"));
if(!action)
return;
}
else
{
- synfigapp::Action::Handle action(synfigapp::Action::create("group_rename"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("GroupRename"));
if(!action)
return;
synfig::Layer::Handle layer((*iter)[model.layer]);
if(!layer)return;
- synfigapp::Action::Handle action(synfigapp::Action::create("layer_activate"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("LayerActivate"));
if(!action)
return;
}
catch(std::exception x)
{
- g_warning(x.what());
+ g_warning("%s", x.what());
}
}
if(synfig::String(selection_data.get_data_type())=="LAYER")
{
- synfigapp::Action::Handle action(synfigapp::Action::create("group_add_layers"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("GroupAddLayers"));
if(!action)
return false;
group=dest_group+GROUP_NEST_CHAR+group;
- synfigapp::Action::Handle action(synfigapp::Action::create("group_rename"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("GroupRename"));
if(!action)
return false;
if(dest_canvas==src->get_canvas() && dest_layer_depth==src->get_depth())
continue;
- synfigapp::Action::Handle action(synfigapp::Action::create("layer_move"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("LayerMove"));
action->set_param("canvas",dest_canvas);
action->set_param("canvas_interface",canvas_interface());
action->set_param("layer",src);
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;
}
LayerGroupTreeStore::rebuild()
{
rebuilding=true;
- etl::clock timer;timer.reset();
+ // etl::clock timer;timer.reset();
try {
// Clear out the current list
}
}
- // Go ahead and and add all the layers
+ // Go ahead and add all the layers
/*std::for_each(
canvas_interface()->get_canvas()->rbegin(), canvas_interface()->get_canvas()->rend(),
sigc::mem_fun(*this, &studio::LayerGroupTreeStore::on_layer_added)
throw;
}
rebuilding=false;
- synfig::info("LayerGroupTreeStore::rebuild() took %f seconds",float(timer()));
+ // synfig::info("LayerGroupTreeStore::rebuild() took %f seconds",float(timer()));
}
void
bool
LayerGroupTreeStore::on_group_removed(synfig::String group)
{
- //DEBUGPOINT();
-
Gtk::TreeModel::Children::iterator iter;
if(find_group_row(group,iter) && iter->children().size()==0)
erase(iter);
bool
LayerGroupTreeStore::on_group_changed(synfig::String /*group*/)
{
- //DEBUGPOINT();
return true;
}
{
if(!layer->get_canvas())
return;
- //DEBUGPOINT();
Gtk::TreeModel::Children::iterator iter;
if(!find_group_row(group, iter))
iter=on_group_added(group);
{
if(!layer->get_canvas())
return;
- //DEBUGPOINT();
Gtk::TreeModel::Children::iterator iter;
if(!find_group_row(group, iter))
return;
// If we aren't rebuilding and the last action
// had something to do with groups, then go
// a head and present the groups dialog.
- if(!rebuilding && canvas_interface()->get_instance()->get_most_recent_action() && canvas_interface()->get_instance()->get_most_recent_action()->get_name().find("group")!=String::npos)
+ if(!rebuilding && canvas_interface()->get_instance()->get_most_recent_action() && canvas_interface()->get_instance()->get_most_recent_action()->get_name().find("Group")!=String::npos)
try
{
App::dock_manager->find_dockable("groups").present();
}
iter=children().end();
- //DEBUGPOINT();
//return false;
}
}
iter=children().end();
- //DEBUGPOINT();
//return false;
}