Disable colsep box when single column.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23060 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-02-19 05:39:36 +00:00
parent 4ab6f265e9
commit bfe96fb61e
2 changed files with 14 additions and 3 deletions

View File

@ -536,6 +536,8 @@ GuiDocument::GuiDocument(GuiView & lv)
this, SLOT(enableSkip(bool)));
connect(textLayoutModule->twoColumnCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
connect(textLayoutModule->twoColumnCB, SIGNAL(clicked()),
this, SLOT(setColSep()));
connect(textLayoutModule->listingsED, SIGNAL(textChanged()),
this, SLOT(change_adaptor()));
connect(textLayoutModule->bypassCB, SIGNAL(clicked()),
@ -1090,6 +1092,12 @@ void GuiDocument::setCustomPapersize(int papersize)
}
void GuiDocument::setColSep()
{
setCustomMargins(marginsModule->marginCB->checkState() == Qt::Checked);
}
void GuiDocument::setCustomMargins(bool custom)
{
marginsModule->topL->setEnabled(!custom);
@ -1120,9 +1128,11 @@ void GuiDocument::setCustomMargins(bool custom)
marginsModule->footskipLE->setEnabled(!custom);
marginsModule->footskipUnit->setEnabled(!custom);
marginsModule->columnsepL->setEnabled(!custom);
marginsModule->columnsepLE->setEnabled(!custom);
marginsModule->columnsepUnit->setEnabled(!custom);
bool const enableColSep = !custom &&
textLayoutModule->twoColumnCB->checkState() == Qt::Checked;
marginsModule->columnsepL->setEnabled(enableColSep);
marginsModule->columnsepLE->setEnabled(enableColSep);
marginsModule->columnsepUnit->setEnabled(enableColSep);
}

View File

@ -131,6 +131,7 @@ private Q_SLOTS:
void setLSpacing(int);
void setMargins(bool);
void setCustomPapersize(int);
void setColSep();
void setCustomMargins(bool);
void romanChanged(int);
void sansChanged(int);