mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
Fix a crash following the input of an invalid paragraph separation value in the document settings dialog (bug 4556).
* src/frontends/qt4/GuiDocument.cpp: - disallow input of defskip length without actual length value. * src/BufferParams.cpp (readToken): - there might be documents with the invalif "\defskip defskip" param. Reset this to "\defskip medskip". git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23022 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fa10443c54
commit
ebc4649508
@ -529,7 +529,11 @@ string const BufferParams::readToken(Lexer & lex, string const & token,
|
||||
paragraph_separation = parseptranslator().find(parsep);
|
||||
} else if (token == "\\defskip") {
|
||||
lex.next();
|
||||
pimpl_->defskip = VSpace(lex.getString());
|
||||
string defskip = lex.getString();
|
||||
if (defskip == "defskip")
|
||||
// this is invalid
|
||||
defskip = "medskip";
|
||||
pimpl_->defskip = VSpace(defskip);
|
||||
} else if (token == "\\quotes_language") {
|
||||
string quotes_lang;
|
||||
lex >> quotes_lang;
|
||||
|
@ -2033,7 +2033,9 @@ void GuiDocument::useClassDefaults()
|
||||
|
||||
bool GuiDocument::isValid()
|
||||
{
|
||||
return validate_listings_params().empty();
|
||||
return (validate_listings_params().empty() &&
|
||||
(textLayoutModule->skipCO->currentIndex() != 3 ||
|
||||
!textLayoutModule->skipLE->text().isEmpty()));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user