summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/point.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-09-27 12:33:10 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-09-27 12:33:10 +0000
commit061bd232b2031ce8697b35a1ce620a29c7db603b (patch)
tree07950b51eb3b8d66763522d3bef091fc2b42eac7 /src/ui/widget/point.cpp
parentDisallow all but RGB Display profiles for previewing (diff)
downloadinkscape-061bd232b2031ce8697b35a1ce620a29c7db603b.tar.gz
inkscape-061bd232b2031ce8697b35a1ce620a29c7db603b.zip
fixing undo problems with LPE widgets. Not completely fixed yet. CheckButtons still crash, and some changes are not recorded in the history (try the random parameters of curve stitching)
(bzr r3809)
Diffstat (limited to 'src/ui/widget/point.cpp')
-rw-r--r--src/ui/widget/point.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ui/widget/point.cpp b/src/ui/widget/point.cpp
index cfaa4303d..ae7197c29 100644
--- a/src/ui/widget/point.cpp
+++ b/src/ui/widget/point.cpp
@@ -43,7 +43,6 @@ Point::Point(Glib::ustring const &label, Glib::ustring const &tooltip,
Glib::ustring const &icon,
bool mnemonic)
: Labelled(label, tooltip, new Gtk::VBox(), suffix, icon, mnemonic),
- setProgrammatically(false),
xwidget("X:",""),
ywidget("Y:","")
{
@@ -69,7 +68,6 @@ Point::Point(Glib::ustring const &label, Glib::ustring const &tooltip,
Glib::ustring const &icon,
bool mnemonic)
: Labelled(label, tooltip, new Gtk::VBox(), suffix, icon, mnemonic),
- setProgrammatically(false),
xwidget("X:","", digits),
ywidget("Y:","", digits)
{
@@ -97,7 +95,6 @@ Point::Point(Glib::ustring const &label, Glib::ustring const &tooltip,
Glib::ustring const &icon,
bool mnemonic)
: Labelled(label, tooltip, new Gtk::VBox(), suffix, icon, mnemonic),
- setProgrammatically(false),
xwidget("X:","", adjust, digits),
ywidget("Y:","", adjust, digits)
{
@@ -194,7 +191,6 @@ Point::setRange(double min, double max)
void
Point::setValue(double xvalue, double yvalue)
{
- setProgrammatically = true; // callback is supposed to reset back, if it cares
xwidget.setValue(xvalue);
ywidget.setValue(yvalue);
}
@@ -206,6 +202,17 @@ Point::update() {
ywidget.update();
}
+/** Check 'setProgrammatically' of both scalar widgets. False if value is changed by user by clicking the widget. */
+bool
+Point::setProgrammatically() {
+ return (xwidget.setProgrammatically || ywidget.setProgrammatically);
+}
+
+void
+Point::clearProgrammatically() {
+ xwidget.setProgrammatically = false;
+ ywidget.setProgrammatically = false;
+}
/** Signal raised when the spin button's value changes */