From 9e2bdd6ea8b5a184786ca9092ee8d0957b360685 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Fri, 30 Aug 2019 16:54:21 +0800 Subject: [PATCH] Gui: assign default guesture to Std_SelBack/Forward --- src/Gui/CommandView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 5c7da40dd8..147689df72 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -3122,6 +3122,8 @@ StdCmdSelForward::StdCmdSelForward() sPixmap = "sel-forward"; sAccel = "S, F"; eType = AlterSelection; + + } void StdCmdSelForward::activated(int iMsg) @@ -3509,6 +3511,13 @@ void CreateViewStdCommands(void) rcCmdMgr.addCommand(new StdCmdSelBack()); rcCmdMgr.addCommand(new StdCmdSelForward()); rcCmdMgr.addCommand(new StdCmdTreeViewActions()); + + + auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + if(hGrp->GetASCII("GestureRollFwdCommand").empty()) + hGrp->SetASCII("GestureRollFwdCommand","Std_SelForward"); + if(hGrp->GetASCII("GestureRollBackCommand").empty()) + hGrp->SetASCII("GestureRollBackCommand","Std_SelBack"); } } // namespace Gui