]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/xforms_helpers.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / xforms_helpers.C
index ca4229fbfcfcc375708f0fcc9f9a257d26682d81..4525e091482db11009691a2be37e657b19b949f5 100644 (file)
@@ -20,6 +20,7 @@
 #include "gettext.h"
 #include "support/LAssert.h"
 #include "lyxlength.h"
+#include "lyxgluelength.h"
 
 using std::ofstream;
 using std::pair;
@@ -158,6 +159,10 @@ string getLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice)
        if (length.empty())
                return string();
 
+       //don't return unit-from-choice if the input(field) contains a unit
+       if (isValidGlueLength(length))
+               return length;
+
        string unit = strip(frontStrip(fl_get_choice_text(choice)));
        unit = subst(unit, "%%", "%");