mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Don't say empty layouts are valid.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35272 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4db466495b
commit
a5cb539d08
@ -583,12 +583,15 @@ void LocalLayout::validate() {
|
|||||||
toqstr("<p style=\"color: #c00000; font-weight: bold; \">")
|
toqstr("<p style=\"color: #c00000; font-weight: bold; \">")
|
||||||
+ invalid + toqstr("</p>");
|
+ invalid + toqstr("</p>");
|
||||||
|
|
||||||
string const layout = fromqstr(locallayoutTE->document()->toPlainText());
|
string const layout =
|
||||||
if (layout.empty())
|
fromqstr(locallayoutTE->document()->toPlainText().trimmed());
|
||||||
|
if (layout.empty()) {
|
||||||
is_valid_ = true;
|
is_valid_ = true;
|
||||||
else
|
infoLB->setText("");
|
||||||
|
} else {
|
||||||
is_valid_ = TextClass::validate(layout);
|
is_valid_ = TextClass::validate(layout);
|
||||||
infoLB->setText(is_valid_ ? vtext : ivtext);
|
infoLB->setText(is_valid_ ? vtext : ivtext);
|
||||||
|
}
|
||||||
validatePB->setEnabled(false);
|
validatePB->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user