From: Jürgen Spitzmüller Date: Fri, 4 Apr 2008 13:33:52 +0000 (+0000) Subject: * src/frontends/qt4/GuiBox.cpp: X-Git-Tag: 1.6.10~5297 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a210f17a194d621257df3319192220548486b6ca;p=features.git * src/frontends/qt4/GuiBox.cpp: * src/insets/InsetBox.cpp: - assure that framed boxes do not contain an inner box. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24116 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index fb8d161810..71546b4d1a 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -157,6 +157,7 @@ void GuiBox::innerBoxChanged(QString const & str) ialignCO->setEnabled(ibox); halignCO->setEnabled(!ibox); heightCB->setEnabled(ibox); + pagebreakCB->setEnabled(!ibox && typeCO->currentIndex() == 1); if (heightCB->checkState() == Qt::Checked && ibox) { heightED->setEnabled(true); heightUnitsLC->setEnabled(true); @@ -179,8 +180,8 @@ void GuiBox::typeChanged(int index) } if (index != 1) pagebreakCB->setChecked(false); - pagebreakCB->setEnabled(index == 1); int itype = innerBoxCO->currentIndex(); + pagebreakCB->setEnabled(index == 1 && itype == 0); setInnerType(frameless, itype); } @@ -228,7 +229,7 @@ void GuiBox::updateContents() pagebreakCB->setChecked(false); } - pagebreakCB->setEnabled(type == "Boxed"); + pagebreakCB->setEnabled(type == "Boxed" && !params_.inner_box); for (int i = 0; i != gui_names_.size(); ++i) { if (type == ids_[i]) @@ -306,7 +307,7 @@ void GuiBox::updateContents() void GuiBox::applyView() { - bool pagebreak = pagebreakCB->isChecked(); + bool pagebreak = pagebreakCB->isEnabled() && pagebreakCB->isChecked(); if (pagebreak) params_.type = "Framed"; else diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 254f9ea840..384526f8db 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -184,7 +184,7 @@ bool InsetBox::forceEmptyLayout(idx_type) const bool InsetBox::showInsetDialog(BufferView * bv) const { - bv->showDialog("box", params2string(params_), + bv->showDialog("box", params2string(params_), const_cast(this)); return true; } @@ -627,6 +627,8 @@ void InsetBoxParams::read(Lexer & lex) if (token == "has_inner_box") { lex.next(); inner_box = lex.getInteger(); + if (type == "Framed") + inner_box = false; } else { lyxerr << "InsetBox::Read: Missing 'has_inner_box'-tag!" << endl; lex.pushToken(token);