mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Squash a warning by fixing the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8710 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
119b50c7c5
commit
bb8f3fc98f
@ -1,3 +1,8 @@
|
|||||||
|
2004-04-29 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
|
* QGraphics.C (apply): Remove a #warning statement by
|
||||||
|
fixing the code.
|
||||||
|
|
||||||
2004-04-28 Angus Leeming <leeming@lyx.org>
|
2004-04-28 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* QLToolbar.[Ch]: rewrite code to derive from a single Toolbar or
|
* QLToolbar.[Ch]: rewrite code to derive from a single Toolbar or
|
||||||
|
@ -373,11 +373,9 @@ void QGraphics::apply()
|
|||||||
igp.lyxscale = strToInt(fromqstr(dialog_->displayscale->text()));
|
igp.lyxscale = strToInt(fromqstr(dialog_->displayscale->text()));
|
||||||
|
|
||||||
igp.rotateAngle = strToDbl(fromqstr(dialog_->angle->text()));
|
igp.rotateAngle = strToDbl(fromqstr(dialog_->angle->text()));
|
||||||
#warning Guess what happens if the user enters '1e30' here?
|
|
||||||
while (igp.rotateAngle < -360.0)
|
if (std::abs(igp.rotateAngle) > 360.0)
|
||||||
igp.rotateAngle += 360.0;
|
igp.rotateAngle -= 360.0 * floor(igp.rotateAngle / 360.0);
|
||||||
while (igp.rotateAngle > 360.0)
|
|
||||||
igp.rotateAngle -= 360.0;
|
|
||||||
|
|
||||||
// save the latex name for the origin. If it is the default
|
// save the latex name for the origin. If it is the default
|
||||||
// then origin_ltx returns ""
|
// then origin_ltx returns ""
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-04-29 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
|
* FormGraphics.C (apply): don't get caught in a loop when mapping
|
||||||
|
the angle into -360 -> 360 degrees.
|
||||||
|
|
||||||
2004-04-28 Angus Leeming <leeming@lyx.org>
|
2004-04-28 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* LayoutEngine.C (updateMetrics): respect the visible() flag when
|
* LayoutEngine.C (updateMetrics): respect the visible() flag when
|
||||||
|
@ -401,12 +401,9 @@ void FormGraphics::apply()
|
|||||||
igp.rotateAngle = strToDbl(getString(extra_->input_rotate_angle));
|
igp.rotateAngle = strToDbl(getString(extra_->input_rotate_angle));
|
||||||
|
|
||||||
// map angle into -360 (clock-wise) to +360 (counter clock-wise)
|
// map angle into -360 (clock-wise) to +360 (counter clock-wise)
|
||||||
while (igp.rotateAngle <= -360.0) {
|
if (std::abs(igp.rotateAngle) > 360.0)
|
||||||
igp.rotateAngle += 360.0;
|
igp.rotateAngle -= 360.0 * floor(igp.rotateAngle / 360.0);
|
||||||
}
|
|
||||||
while (igp.rotateAngle >= 360.0) {
|
|
||||||
igp.rotateAngle -= 360.0;
|
|
||||||
}
|
|
||||||
fl_set_input(extra_->input_rotate_angle, tostr(igp.rotateAngle).c_str());
|
fl_set_input(extra_->input_rotate_angle, tostr(igp.rotateAngle).c_str());
|
||||||
|
|
||||||
int const origin_pos = fl_get_choice(extra_->choice_origin);
|
int const origin_pos = fl_get_choice(extra_->choice_origin);
|
||||||
|
Loading…
Reference in New Issue
Block a user