Jean-Marc Lasgouttes wrote:
> If you can do the patch, I'll apply it. Note that as of today, I do
> not think there will be a 1.2.3. But one never knows...
For what it's worth, here it comes.
Jürgen.
Index: src/ChangeLog
===
RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v
retrieving revision 1.713.2.52
diff -u -r1.713.2.52 ChangeLog
--- src/ChangeLog 2002/12/16 14:57:01 1.713.2.52
+++ src/ChangeLog 2002/12/18 19:24:07
@@ -1,3 +1,8 @@
+2002-12-18 Juergen Spitzmueller <[EMAIL PROTECTED]>
+
+ * lyxlength.[Ch]: set default unit to UNIT_NONE,
+ implement bool empty() [bug 490]
+
2002-12-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
* version.C.in: update (again) release date for 1.2.2
Index: src/lyxlength.C
===
RCS file: /cvs/lyx/lyx-devel/src/lyxlength.C,v
retrieving revision 1.15.2.2
diff -u -r1.15.2.2 lyxlength.C
--- src/lyxlength.C 2002/06/20 12:39:08 1.15.2.2
+++ src/lyxlength.C 2002/12/18 19:24:08
@@ -27,7 +27,7 @@
using std::abs;
LyXLength::LyXLength()
- : val_(0), unit_(LyXLength::PT)
+ : val_(0), unit_(LyXLength::UNIT_NONE)
{}
@@ -157,6 +157,12 @@
bool LyXLength::zero() const
{
return val_ == 0.0;
+}
+
+
+bool LyXLength::empty() const
+{
+ return unit_ == LyXLength::UNIT_NONE;
}
Index: src/lyxlength.h
===
RCS file: /cvs/lyx/lyx-devel/src/lyxlength.h,v
retrieving revision 1.7.2.1
diff -u -r1.7.2.1 lyxlength.h
--- src/lyxlength.h 2002/06/20 12:39:08 1.7.2.1
+++ src/lyxlength.h 2002/12/18 19:24:08
@@ -63,6 +63,8 @@
void unit(LyXLength::UNIT unit);
///
bool zero() const;
+ ///
+ bool empty() const;
/// return string representation
string const asString() const;
/// return string representation for LaTeX
Index: src/frontends/xforms/ChangeLog
===
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.381.2.26
diff -u -r1.381.2.26 ChangeLog
--- src/frontends/xforms/ChangeLog 2002/10/22 14:44:42 1.381.2.26
+++ src/frontends/xforms/ChangeLog 2002/12/18 19:24:15
@@ -1,3 +1,8 @@
+2002-12-18 Juergen Spitzmueller <[EMAIL PROTECTED]>
+
+ * xforms_helpers.C: (updateWidgetsFromLength)
+ use len.empty() instead of len.zero() [bug 490]
+
2002-10-22 Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
* xformsGImage.C (getWidth): add 4 instead of 2 in the fix below,
Index: src/frontends/xforms/xforms_helpers.C
===
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/xforms_helpers.C,v
retrieving revision 1.43
diff -u -r1.43 xforms_helpers.C
--- src/frontends/xforms/xforms_helpers.C 2002/04/23 08:16:27 1.43
+++ src/frontends/xforms/xforms_helpers.C 2002/12/18 19:24:17
@@ -201,7 +201,7 @@
lyx::Assert(input && input->objclass == FL_INPUT &&
choice && choice->objclass == FL_CHOICE);
- if (len.zero()) {
+ if (len.empty()) {
fl_set_input(input, "");
fl_set_choice_text(choice, default_unit.c_str());
} else {