]> git.lyx.org Git - features.git/commitdiff
GuiDocument.cpp: add missing validation code
authorUwe Stöhr <uwestoehr@lyx.org>
Mon, 17 Apr 2017 18:58:09 +0000 (20:58 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Mon, 17 Apr 2017 18:58:09 +0000 (20:58 +0200)
src/frontends/qt4/GuiDocument.cpp

index d3ccb8f5b0266d544063a4f5b2852022e3e93835..691bb2c9249da2c967eef959adb60ef7f4a19a3a 100644 (file)
@@ -4066,6 +4066,14 @@ bool GuiDocument::isValid()
                        textLayoutModule->indentCO->currentIndex() != 1 ||
                        // or else a length has been given
                        !textLayoutModule->indentLE->text().isEmpty()
+               ) &&
+               (
+                       // if we're asking for indentation
+                       !textLayoutModule->MathIndentCB->isChecked() ||
+                       // then either we haven't chosen custom
+                       textLayoutModule->MathIndentCO->currentIndex() != 1 ||
+                       // or else a length has been given
+                       !textLayoutModule->MathIndentLE->text().isEmpty()
                );
 }