diff --git a/src/mouse.cpp b/src/mouse.cpp index c6f2178e..a3a59032 100644 --- a/src/mouse.cpp +++ b/src/mouse.cpp @@ -570,7 +570,6 @@ void GraphicsWindow::MouseRightUp(double x, double y) { AddContextMenuItem("Snap to Grid", ContextCommand::SNAP_TO_GRID); } - if(gs.points == 1 && gs.point[0].isFromRequest()) { Request *r = SK.GetRequest(gs.point[0].request()); int index = r->IndexOfPoint(gs.point[0]); @@ -590,6 +589,9 @@ void GraphicsWindow::MouseRightUp(double x, double y) { AddContextMenuItem("Add Spline Point", ContextCommand::ADD_SPLINE_PT); } } + if(gs.entities == gs.n) { + AddContextMenuItem("Toggle Construction", ContextCommand::CONSTRUCTION); + } if(gs.points == 1) { Entity *p = SK.GetEntity(gs.point[0]); @@ -702,6 +704,10 @@ void GraphicsWindow::MouseRightUp(double x, double y) { MenuEdit(Command::SNAP_TO_GRID); break; + case ContextCommand::CONSTRUCTION: + MenuRequest(Command::CONSTRUCTION); + 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 569c4b8d..e3e8115a 100644 --- a/src/ui.h +++ b/src/ui.h @@ -139,6 +139,7 @@ enum class ContextCommand : uint32_t { SNAP_TO_GRID, REMOVE_SPLINE_PT, ADD_SPLINE_PT, + CONSTRUCTION, FIRST_STYLE = 0x40000000 };