From 0a8ee8565416883cf8a9ee8003833a0829790780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sun, 2 Dec 2001 16:21:10 +0000 Subject: [PATCH] rotatefix patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3130 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insetgraphics.C | 8 +++----- src/insets/insetgraphicsParams.C | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 89aa982082..845334873f 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-12-01 John Levon + + * insetgraphics.C: + * insetgraphicsParams.C: fix inverted sense of float_equal + 2001-11-30 Juergen Vigna * insettabular.C (InsetTabular): use the save_id flag to create also diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index dbc36183f4..b4f7f7cd5e 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -28,10 +28,7 @@ Known BUGS: We should probably use what the user asks to use... but when he chooses by the file dialog we normally get an absolute path and this may not be what the user meant. - * Bug in FileDlg class (src/filedlg.[hC]) when selecting a file and then - pressing ok, it counts as if no real selection done. Apparently - when choosing a file it doesn't update the select file input line. - + * If we are trying to create a file in a read-only directory and there are graphics that need converting, the converting will fail because it is done in-place, into the same directory as the original image. @@ -168,6 +165,7 @@ using std::endl; // This function is a utility function +// ... that should be with ChangeExtension ... inline string const RemoveExtension(string const & filename) { @@ -534,7 +532,7 @@ InsetGraphics::createLatexOptions() const // Make sure it's not very close to zero, a float can be effectively // zero but not exactly zero. - if (lyx::float_equal(params.rotateAngle, 0, 0.001)) { + if (!lyx::float_equal(params.rotateAngle, 0, 0.001)) { options << "angle=" << params.rotateAngle << ','; } diff --git a/src/insets/insetgraphicsParams.C b/src/insets/insetgraphicsParams.C index 83956d378a..846f28d84e 100644 --- a/src/insets/insetgraphicsParams.C +++ b/src/insets/insetgraphicsParams.C @@ -251,8 +251,9 @@ void InsetGraphicsParams::Write(Buffer const * buf, ostream & os) const writeResize(os, "height", heightResize, heightSize); writeOrigin(os, rotateOrigin); - if (lyx::float_equal(rotateAngle, 0.0, 0.001)) + if (!lyx::float_equal(rotateAngle, 0.0, 0.001)) { os << " rotateAngle " << rotateAngle << '\n'; + } }