Add "Select All" to context menu for no selection.

pull/66/head
whitequark 2016-10-09 22:26:25 +00:00
parent 2f4c6a6b0e
commit 2f64f18095
2 changed files with 7 additions and 0 deletions

View File

@ -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);

View File

@ -140,6 +140,7 @@ enum class ContextCommand : uint32_t {
REMOVE_SPLINE_PT,
ADD_SPLINE_PT,
CONSTRUCTION,
SELECT_ALL,
FIRST_STYLE = 0x40000000
};