]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiApplication.cpp
Auto feature for minibuffer toolbar
[features.git] / src / frontends / qt4 / GuiApplication.cpp
index 8bd22c8c0385134b495e7ca234e05871047199e2..fa668716bb88405bfb6297dd87a63913c2883d01 100644 (file)
@@ -965,6 +965,9 @@ struct GuiApplication::Private
        ///
        KeyModifier meta_fake_bit;
 
+       /// The result of last dispatch action
+       DispatchResult dispatch_result_;
+
        /// Multiple views container.
        /**
        * Warning: This must not be a smart pointer as the destruction of the
@@ -1372,7 +1375,7 @@ static docstring makeDispatchMessage(docstring const & msg,
 }
 
 
-void GuiApplication::dispatch(FuncRequest const & cmd)
+DispatchResult const & GuiApplication::dispatch(FuncRequest const & cmd)
 {
        Buffer * buffer = 0;
        if (current_view_ && current_view_->currentBufferView()) {
@@ -1392,6 +1395,9 @@ void GuiApplication::dispatch(FuncRequest const & cmd)
        // the buffer may have been closed by one action
        if (theBufferList().isLoaded(buffer))
                buffer->undo().endUndoGroup();
+
+       d->dispatch_result_ = dr;
+       return d->dispatch_result_;
 }