Make undo/redo shortcuts work from sidebar docking window

Change-Id: I20ec2363d156d51528d4cce618311b8b919dfb87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89314
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Jim Raykowski
2020-02-22 19:44:59 -09:00
committed by Noel Grandin
parent 9e329cd476
commit 7d80301896

View File

@@ -21,6 +21,7 @@
#include <sfx2/sidebar/SidebarController.hxx>
#include <sidebar/PanelDescriptor.hxx>
#include <comphelper/dispatchcommand.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/lokhelper.hxx>
#include <sfx2/bindings.hxx>
@@ -276,6 +277,11 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
Close();
return true;
}
if (".uno:Undo" == aCommand || ".uno:Redo" == aCommand)
{
comphelper::dispatchCommand(aCommand, {});
return true;
}
}
else if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType)
{