**
** \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
LayerTreeStore::LayerTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_):
Gtk::TreeStore (ModelHack()),
+ queued (false),
canvas_interface_ (canvas_interface_)
{
layer_icon=Gtk::Button().render_icon(Gtk::StockID("synfig-layer"),Gtk::ICON_SIZE_SMALL_TOOLBAR);
LayerTreeStore::~LayerTreeStore()
{
- synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted");
+ if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+ synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted");
}
int
}
void
+LayerTreeStore::queue_rebuild()
+{
+ if (queued) return;
+ queued = false;
+ queue_connection.disconnect();
+ queue_connection=Glib::signal_timeout().connect(
+ sigc::bind_return(
+ sigc::mem_fun(*this,&LayerTreeStore::rebuild),
+ false
+ )
+ ,150);
+}
+
+void
LayerTreeStore::rebuild()
{
+ if (queued) queued = false;
+
//etl::clock timer;timer.reset();
//synfig::warning("---------rebuilding layer table---------");