On Tuesday 04 February 2003 11:16 am, [EMAIL PROTECTED] wrote:
> > Shrug. No external test, no commit.
>
> OK, I tested it (really!). It works perfectly.
>
> Please apply.
>
> Michael

Lars, Ok to apply? Fixes an off by one error.
Angus
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.660
diff -u -p -r1.660 ChangeLog
--- src/frontends/xforms/ChangeLog	2 Feb 2003 00:48:37 -0000	1.660
+++ src/frontends/xforms/ChangeLog	2 Feb 2003 00:49:33 -0000
@@ -1,3 +1,8 @@
+2003-02-02  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* FormGraphics.C: Fix off by one error in update/apply of rotation
+	origin.
+
 2003-01-31  Angus Leeming  <[EMAIL PROTECTED]>
 
 	* FormBase.[Ch]: instantiate the isVisible() virtual method.
Index: src/frontends/xforms/FormGraphics.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormGraphics.C,v
retrieving revision 1.98
diff -u -p -r1.98 FormGraphics.C
--- src/frontends/xforms/FormGraphics.C	6 Jan 2003 14:02:22 -0000	1.98
+++ src/frontends/xforms/FormGraphics.C	2 Feb 2003 00:49:34 -0000
@@ -402,7 +402,7 @@ void FormGraphics::apply()
 	fl_set_input(extra_->input_rotate_angle, tostr(igp.rotateAngle).c_str());
 
 	int const origin_pos = fl_get_choice(extra_->choice_origin);
-	if (origin_pos == 1) {
+	if (origin_pos == 0) {
 		igp.rotateOrigin.erase();
 	} else {
 		igp.rotateOrigin = origins_[origin_pos - 1];
@@ -486,7 +486,7 @@ void FormGraphics::update() {
 	if (igp.rotateOrigin.empty()) {
 		origin_pos = 1;
 	} else {
-		origin_pos = 2 + findPos(origins_, igp.rotateOrigin);
+		origin_pos = 1 + findPos(origins_, igp.rotateOrigin);
 	}
 	fl_set_choice(extra_->choice_origin, origin_pos);
 

Reply via email to