unsharp-mask: use GeglOperationMeta::update

parent 880220ae
......@@ -61,7 +61,7 @@ update_graph (GeglOperation *operation)
{
GeglProperties *o = GEGL_PROPERTIES (operation);
State *state = o->user_data;
if (!state) return;
if (o->threshold > 0.0001)
{
gegl_node_connect_from (state->absolute, "input",
......@@ -117,22 +117,6 @@ attach (GeglOperation *operation)
gegl_operation_meta_redirect (operation, "scale", multiply, "value");
gegl_operation_meta_redirect (operation, "std-dev", blur, "std-dev-x");
gegl_operation_meta_redirect (operation, "std-dev", blur, "std-dev-y");
update_graph (operation);
}
static void
my_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GeglProperties *o = GEGL_PROPERTIES (object);
set_property (object, property_id, value, pspec);
if (o)
update_graph ((void*)object);
}
static void
......@@ -146,16 +130,17 @@ dispose (GObject *object)
static void
gegl_op_class_init (GeglOpClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
object_class = G_OBJECT_CLASS (klass);
object_class->dispose = dispose;
object_class->set_property = my_set_property;
GObjectClass *object_class;
GeglOperationClass *operation_class;
GeglOperationMetaClass *operation_meta_class;
operation_class = GEGL_OPERATION_CLASS (klass);
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
operation_meta_class = GEGL_OPERATION_META_CLASS (klass);
operation_class->attach = attach;
object_class->dispose = dispose;
operation_class->attach = attach;
operation_meta_class->update = update_graph;
gegl_operation_class_set_keys (operation_class,
"name", "gegl:unsharp-mask",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment