GuiApplication::dispatch(): decrease indentation at the end.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36722 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2010-12-04 22:15:51 +00:00
parent 1376c39ae6
commit 7916b0dc68

View File

@ -1605,8 +1605,10 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
default:
// Everything below is only for active window
if (current_view_ == 0)
if (current_view_)
break;
return;
}
// Let the current GuiView dispatch its own actions.
current_view_->dispatch(cmd, dr);
@ -1678,17 +1680,16 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
dr = bv->cursor().result();
current_view_->setBusy(false);
}
// if we executed a mutating lfun, mark the buffer as dirty
Buffer * doc_buffer = (current_view_ && current_view_->documentBufferView())
Buffer * doc_buffer = (current_view_->documentBufferView())
? &(current_view_->documentBufferView()->buffer()) : 0;
if (doc_buffer && theBufferList().isLoaded(doc_buffer)
&& flag.enabled()
&& !lyxaction.funcHasFlag(action, LyXAction::NoBuffer)
&& !lyxaction.funcHasFlag(action, LyXAction::ReadOnly))
current_view_->currentBufferView()->buffer().markDirty();
current_view_->setBusy(false);
}