#include "onemoment.h"
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
Duckmatic::~Duckmatic()
{
clear_ducks();
- //synfig::info("Duckmatic::~Duckmatic(): Deleted. Duck Count=%d",Duck::duck_count);
+
+ if (Duck::duck_count)
+ synfig::error("%d ducks not yet deleted!", Duck::duck_count);
+
+ if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+ synfig::info("Duckmatic::~Duckmatic(): Deleted");
}
void
const Type type(get_type_mask());
if(( x->get_type() && (!(type & x->get_type())) ) )
- {
return false;
- }
+
if(x->get_value_desc().parent_is_layer_param() && type & Duck::TYPE_POSITION)
{
Layer::Handle layer(x->get_value_desc().get_layer());
String layer_name(layer->get_name());
- if(
- layer_name=="outline" ||
- layer_name=="region" ||
- layer_name=="polygon" ||
- layer_name=="curve_gradient"
- )
+
+ if (layer_name == "outline" || layer_name == "region" || layer_name == "plant" ||
+ layer_name == "polygon" || layer_name == "curve_gradient")
return false;
+
if((layer_name=="PasteCanvas"|| layer_name=="paste_canvas") &&
!layer->get_param("children_lock").get(bool()))
return false;
}
Point
-Duckmatic::snap_point_to_grid(const Point& x, float radius)const
+Duckmatic::snap_point_to_grid(const synfig::Point& x, float radius)const
{
Point ret(x);
bool
Duckmatic::save_sketch(const synfig::String& filename)const
{
+ ChangeLocale change_locale(LC_NUMERIC, "C");
std::ofstream file(filename.c_str());
if(!file)return false;
bool
Duckmatic::load_sketch(const synfig::String& filename)
{
+ ChangeLocale change_locale(LC_NUMERIC, "C");
std::ifstream file(filename.c_str());
if(!file)