]> git.lyx.org Git - lyx.git/commitdiff
GuiBox.cpp: addendum to [f04c7711/lyxgit]
authorUwe Stöhr <uwestoehr@lyx.org>
Sat, 25 May 2013 11:52:09 +0000 (13:52 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Sat, 25 May 2013 11:52:09 +0000 (13:52 +0200)
- this was forgotten to commit;
(without this we would get invalid LaTeX code when changing in the box dialog a makebox without a width to a minipage and press apply - a makebox required to specify a width, at least an invisible one like "0cm")

src/frontends/qt4/GuiBox.cpp

index 90f5659439dfb2a9eb7ef68fd581d24fc4f98a38..afca9ab5225f08b384c0d58951f565c79ee48f20 100644 (file)
@@ -378,6 +378,9 @@ docstring GuiBox::dialogToParams() const
                        params.width = Length(value.toDouble(), Length::IN);
                } else {
                        params.special = "none";
+                       // we must specify a valid length in this case
+                       if (value.isEmpty())
+                               widthED->setText("0");
                        params.width = Length(widgetsToLength(widthED, widthUnitsLC));
                }
        } else {