]> git.lyx.org Git - features.git/commitdiff
Disable colsep box when single column.
authorRichard Heck <rgheck@comcast.net>
Tue, 19 Feb 2008 05:39:36 +0000 (05:39 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 19 Feb 2008 05:39:36 +0000 (05:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23060 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiDocument.h

index a0054bf48bff912ec35a68f41ca460b7b1b35a63..6ea8affba35f3466bdc10d7419ddc6e6f89b3ccf 100644 (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);
 }
 
 
index 5f4d6ef2518c7b8d869a7288b3f4407f22927e9e..bdcc0260827959dea234433a7b1700ab6abce043 100644 (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);