Code

Filter effects dialog:
authornicholasbishop <nicholasbishop@users.sourceforge.net>
Sun, 12 Aug 2007 07:16:39 +0000 (07:16 +0000)
committernicholasbishop <nicholasbishop@users.sourceforge.net>
Sun, 12 Aug 2007 07:16:39 +0000 (07:16 +0000)
A couple bug fixes; the Link togglebutton for dual spinsliders now updates properly when switching between primitives. Also, the in2 attribute of feDisplacementMap is now properly checked when reordering primitives.

src/ui/dialog/filter-effects-dialog.cpp
src/ui/widget/spin-slider.cpp

index 3c5a351e67be9cb9b396ff449f678fec3eec3145..fe2e8f1c6fc66283f19813fdb8d62e70080e3a0e 100644 (file)
@@ -1629,6 +1629,10 @@ void check_single_connection(SPFilterPrimitive* prim, const int result)
             if(SP_FECOMPOSITE(prim)->in2 == result)
                 SP_OBJECT_REPR(prim)->setAttribute("in2", 0);
         }
+        else if(SP_IS_FEDISPLACEMENTMAP(prim)) {
+            if(SP_FEDISPLACEMENTMAP(prim)->in2 == result)
+                SP_OBJECT_REPR(prim)->setAttribute("in2", 0);
+        }
     }
 }
 
index 8e2cbc0264bda7505094f24642e79247c37b0e9c..15cd5ea1b881946b207ac7f3b7e49f64dad360ab 100644 (file)
@@ -148,6 +148,8 @@ void DualSpinSlider::set_from_attribute(SPObject* o)
             if(toks[1])
                 v2 = Glib::Ascii::strtod(toks[1]);
 
+            _link.set_active(toks[1] == 0);
+
             _s1.get_adjustment().set_value(v1);
             _s2.get_adjustment().set_value(v2);