mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
I guess I like this better.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35020 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
523056c092
commit
35327c0b5b
@ -1239,9 +1239,11 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_TEXTCLASS_APPLY: {
|
case LFUN_TEXTCLASS_APPLY: {
|
||||||
bool success = LayoutFileList::get().load(argument, buffer_.temppath());
|
// since this shortcircuits, the second call is made only if
|
||||||
if (!success)
|
// the first fails
|
||||||
success = LayoutFileList::get().load(argument, buffer_.filePath());
|
bool const success =
|
||||||
|
LayoutFileList::get().load(argument, buffer_.temppath()) ||
|
||||||
|
LayoutFileList::get().load(argument, buffer_.filePath());
|
||||||
if (!success) {
|
if (!success) {
|
||||||
docstring s = bformat(_("The document class `%1$s' "
|
docstring s = bformat(_("The document class `%1$s' "
|
||||||
"could not be loaded."), from_utf8(argument));
|
"could not be loaded."), from_utf8(argument));
|
||||||
@ -1269,9 +1271,11 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_TEXTCLASS_LOAD: {
|
case LFUN_TEXTCLASS_LOAD: {
|
||||||
bool success = LayoutFileList::get().load(argument, buffer_.temppath());
|
// since this shortcircuits, the second call is made only if
|
||||||
if (!success)
|
// the first fails
|
||||||
success = LayoutFileList::get().load(argument, buffer_.filePath());
|
bool const success =
|
||||||
|
LayoutFileList::get().load(argument, buffer_.temppath()) ||
|
||||||
|
LayoutFileList::get().load(argument, buffer_.filePath());
|
||||||
if (!success) {
|
if (!success) {
|
||||||
docstring s = bformat(_("The document class `%1$s' "
|
docstring s = bformat(_("The document class `%1$s' "
|
||||||
"could not be loaded."), from_utf8(argument));
|
"could not be loaded."), from_utf8(argument));
|
||||||
|
Loading…
Reference in New Issue
Block a user