The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 427aeff90fdb9ff5a698c73b72240467611c9f04
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Sat May 25 15:07:17 2013 +0200

    GuiBox.cpp, InsetBox.cpp: fix some wrong logic
    
    - InsetBox.cpp:
     a framebox without inner box and without a width is \fbox
     a framebox with inner box is also \fbox
     a framebox without inner box and with width is \framebox
    
    - GuiBox.cpp: the width checkbox must be checked if there is width

diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp
index afca9ab..d3bd8e8 100644
--- a/src/frontends/qt4/GuiBox.cpp
+++ b/src/frontends/qt4/GuiBox.cpp
@@ -128,7 +128,7 @@ void GuiBox::on_innerBoxCO_activated(int /* index */)
        // the width can only be selected for makebox or framebox
        widthCB->setEnabled(itype == "makebox"
                            || (outer == "Boxed" && itype == "none"));
-       widthCB->setChecked(itype != "none" && !widthCB->isEnabled());
+       widthCB->setChecked(!widthED->text().isEmpty());
        // except for frameless and boxed, the width cannot be specified if
        // there is no inner box
        bool const width_enabled =
@@ -313,8 +313,7 @@ void GuiBox::paramsToDialog(Inset const * inset)
                lengthToWidgets(widthED, widthUnitsLC,
                        params.width, default_unit);
        } else {
-               if (widthCB->isEnabled())
-                       widthCB->setChecked(true);
+               widthCB->setChecked(true);
                lengthToWidgets(widthED, widthUnitsLC,
                        params.width, default_unit);
                QString const special = toqstr(params.special);
diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp
index a07df27..30c2386 100644
--- a/src/insets/InsetBox.cpp
+++ b/src/insets/InsetBox.cpp
@@ -317,9 +317,9 @@ void InsetBox::latex(otexstream & os, OutputParams const & 
runparams) const
                os << "\\begin{framed}%\n";
                break;
        case Boxed:
-               if (width_string.empty()) {
-                       os << "\\framebox";
+               if (!width_string.empty()) {
                        if (!params_.inner_box) {
+                               os << "\\framebox";
                                // Special widths, see usrguide sec. 3.5
                                // FIXME UNICODE
                                if (params_.special != "none") {
@@ -331,7 +331,8 @@ void InsetBox::latex(otexstream & os, OutputParams const & 
runparams) const
                                           << ']';
                                if (params_.hor_pos != 'c')
                                        os << "[" << params_.hor_pos << "]";
-                       }
+                       } else
+                               os << "\\fbox";
                } else
                        os << "\\fbox";
                os << "{";

-----------------------------------------------------------------------

Summary of changes:
 src/frontends/qt4/GuiBox.cpp |    5 ++---
 src/insets/InsetBox.cpp      |    7 ++++---
 2 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to