summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e38e15f)
raw | patch | inline | side by side (parent: e38e15f)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 16 Oct 2007 18:11:42 +0000 (18:11 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 16 Oct 2007 18:11:42 +0000 (18:11 +0000) |
src/ui/widget/registered-widget.cpp | patch | blob | history |
index 46532d35848aa15bf60b058aefef51e511c8dac4..7125318ca705df77e4e369a484c5865987dc4844 100644 (file)
@@ -110,13 +110,16 @@ RegisteredCheckButton::init (const Glib::ustring& label, const Glib::ustring& ti
void
RegisteredCheckButton::setActive (bool b)
{
-// FIXME: for some reason, this function is also called when user clicks. then setProgrammatically should not be set!
+ if (_wr->isUpdating())
+ return;
+
setProgrammatically = true;
_button->set_active (b);
//The slave button is greyed out if the master button is unchecked
for (std::list<Gtk::ToggleButton*>::const_iterator i = _slavebuttons.begin(); i != _slavebuttons.end(); i++) {
(*i)->set_sensitive(b);
}
+ setProgrammatically = false;
}
void
if (_wr->isUpdating())
return;
-
_wr->setUpdating (true);
write_to_xml(_button->get_active() ? "true" : "false");
void
RegisteredScalarUnit::setValue (double val)
{
+ if (_wr->isUpdating())
+ return;
+
_widget->setValue (val);
}
void
RegisteredScalar::setValue (double val)
{
+ if (_wr->isUpdating())
+ return;
+
_widget->setValue (val);
}
@@ -341,6 +349,9 @@ RegisteredColorPicker::init (const Glib::ustring& label, const Glib::ustring& ti
void
RegisteredColorPicker::setRgba32 (guint32 rgba)
{
+ if (_wr->isUpdating())
+ return;
+
_cp->setRgba32 (rgba);
}
@@ -422,6 +433,9 @@ RegisteredSuffixedInteger::init (const Glib::ustring& label, const Glib::ustring
void
RegisteredSuffixedInteger::setValue (int i)
{
+ if (_wr->isUpdating())
+ return;
+
setProgrammatically = true;
_adj.set_value (i);
}
@@ -483,6 +497,9 @@ const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument
void
RegisteredRadioButtonPair::setValue (bool second)
{
+ if (_wr->isUpdating())
+ return;
+
setProgrammatically = true;
if (second) _rb2->set_active();
else _rb1->set_active();
void
RegisteredPoint::setValue (double xval, double yval)
{
+ if (_wr->isUpdating())
+ return;
+
_widget->setValue(xval, yval);
}
void
RegisteredRandom::setValue (double val, long startseed)
{
+ if (_wr->isUpdating())
+ return;
+
_widget->setValue (val);
_widget->setStartSeed(startseed);
}