From 2f64f1809568a6406c1a829c849cd664a2c8c54a Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 9 Oct 2016 22:26:25 +0000 Subject: [PATCH] Add "Select All" to context menu for no selection. --- src/mouse.cpp | 6 ++++++ src/ui.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/mouse.cpp b/src/mouse.cpp index a3a59032..ae98c7fd 100644 --- a/src/mouse.cpp +++ b/src/mouse.cpp @@ -613,6 +613,8 @@ void GraphicsWindow::MouseRightUp(double x, double y) { AddContextMenuItem("Cut", ContextCommand::CUT_SEL); AddContextMenuItem("Copy", ContextCommand::COPY_SEL); } + } else { + AddContextMenuItem("Select All", ContextCommand::SELECT_ALL); } if((SS.clipboard.r.n > 0 || SS.clipboard.c.n > 0) && LockedInWorkplane()) { @@ -708,6 +710,10 @@ void GraphicsWindow::MouseRightUp(double x, double y) { MenuRequest(Command::CONSTRUCTION); break; + case ContextCommand::SELECT_ALL: + MenuEdit(Command::SELECT_ALL); + break; + case ContextCommand::REMOVE_SPLINE_PT: { hRequest hr = gs.point[0].request(); Request *r = SK.GetRequest(hr); diff --git a/src/ui.h b/src/ui.h index e3e8115a..cb7eac6c 100644 --- a/src/ui.h +++ b/src/ui.h @@ -140,6 +140,7 @@ enum class ContextCommand : uint32_t { REMOVE_SPLINE_PT, ADD_SPLINE_PT, CONSTRUCTION, + SELECT_ALL, FIRST_STYLE = 0x40000000 };