return 0;
}
+ // automatically export the Index parameter of new Duplicate layers
+ if (name == "duplicate")
+ for (int i = 1; ; i++)
+ {
+ String name = strprintf(_("Index %d"), i);
+ try
+ {
+ canvas->find_value_node(name);
+ }
+ catch (Exception::IDNotFound x)
+ {
+ add_value_node(layer->dynamic_param_list().find("index")->second, name);
+ break;
+ }
+ }
+
layer->set_canvas(canvas);
// Apply some defaults
action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
action->set_param("value_desc",value_desc);
action->set_param("type",type);
+ action->set_param("time",get_time());
if(!action->is_ready())
{
{
x[0]=size[0];
x[1]=size[0]/w*h;
- if(size[0]<0 ^ size[1]<0)
+ if((size[0]<0) ^ (size[1]<0))
x[1]=-x[1];
}
else
{
x[1]=size[1];
x[0]=size[1]/h*w;
- if(size[0]<0 ^ size[1]<0)
+ if((size[0]<0) ^ (size[1]<0))
x[0]=-x[0];
}
if(!layer->set_param("tl",ValueBase(-x/2)))