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: {
|
||||
bool success = LayoutFileList::get().load(argument, buffer_.temppath());
|
||||
if (!success)
|
||||
success = LayoutFileList::get().load(argument, buffer_.filePath());
|
||||
// since this shortcircuits, the second call is made only if
|
||||
// the first fails
|
||||
bool const success =
|
||||
LayoutFileList::get().load(argument, buffer_.temppath()) ||
|
||||
LayoutFileList::get().load(argument, buffer_.filePath());
|
||||
if (!success) {
|
||||
docstring s = bformat(_("The document class `%1$s' "
|
||||
"could not be loaded."), from_utf8(argument));
|
||||
@ -1269,9 +1271,11 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
}
|
||||
|
||||
case LFUN_TEXTCLASS_LOAD: {
|
||||
bool success = LayoutFileList::get().load(argument, buffer_.temppath());
|
||||
if (!success)
|
||||
success = LayoutFileList::get().load(argument, buffer_.filePath());
|
||||
// since this shortcircuits, the second call is made only if
|
||||
// the first fails
|
||||
bool const success =
|
||||
LayoutFileList::get().load(argument, buffer_.temppath()) ||
|
||||
LayoutFileList::get().load(argument, buffer_.filePath());
|
||||
if (!success) {
|
||||
docstring s = bformat(_("The document class `%1$s' "
|
||||
"could not be loaded."), from_utf8(argument));
|
||||
|
Loading…
Reference in New Issue
Block a user