diff --git a/draw.cpp b/draw.cpp index e7ac5bd3..4392e974 100644 --- a/draw.cpp +++ b/draw.cpp @@ -269,6 +269,13 @@ void GraphicsWindow::ClearPending(void) { void GraphicsWindow::MouseMiddleOrRightDown(double x, double y) { if(GraphicsEditControlIsVisible()) return; + if(pending.operation == DRAGGING_NEW_LINE_POINT) { + // Special case; use a middle or right click to stop drawing lines, + // since a left click would draw another one. This is quicker and + // more intuitive than hitting escape. + ClearPending(); + } + orig.offset = offset; orig.projUp = projUp; orig.projRight = projRight; diff --git a/graphicswin.cpp b/graphicswin.cpp index 89cf1f42..67fa956d 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -42,59 +42,62 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 1, "Dimensions in &Millimeters", MNU_UNITS_MM, 0, mView }, { 0, "&New Group", 0, 0, NULL }, -{ 1, "&Drawing in 3d\tShift+Ctrl+D", MNU_GROUP_3D, 'D'|S|C,mGrp }, -{ 1, "Drawing in Workplane\tShift+Ctrl+W", MNU_GROUP_WRKPL, 'W'|S|C,mGrp }, +{ 1, "&Drawing in 3d\tShift+D", MNU_GROUP_3D, 'D'|S, mGrp }, +{ 1, "Drawing in Workplane\tShift+W", MNU_GROUP_WRKPL, 'W'|S, mGrp }, { 1, NULL, 0, NULL }, -{ 1, "Step &Translating\tShift+Ctrl+T", MNU_GROUP_TRANS, 'T'|S|C,mGrp }, -{ 1, "Step &Rotating\tShift+Ctrl+R", MNU_GROUP_ROT, 'R'|S|C,mGrp }, +{ 1, "Step &Translating\tShift+T", MNU_GROUP_TRANS, 'T'|S, mGrp }, +{ 1, "Step &Rotating\tShift+R", MNU_GROUP_ROT, 'R'|S, mGrp }, { 1, NULL, 0, 0, NULL }, -{ 1, "E&xtrude\tShift+Ctrl+X", MNU_GROUP_EXTRUDE, 'X'|S|C,mGrp }, -{ 1, "&Lathe\tShift+Ctrl+L", MNU_GROUP_LATHE, 'L'|S|C,mGrp }, -{ 1, "&Sweep\tShift+Ctrl+S", MNU_GROUP_SWEEP, 'S'|S|C,mGrp }, -{ 1, "&Helical Sweep\tShift+Ctrl+H", MNU_GROUP_HELICAL, 'H'|S|C,mGrp }, +{ 1, "E&xtrude\tShift+X", MNU_GROUP_EXTRUDE, 'X'|S, mGrp }, +{ 1, "&Lathe\tShift+L", MNU_GROUP_LATHE, 'L'|S, mGrp }, +{ 1, "&Sweep\tShift+S", MNU_GROUP_SWEEP, 'S'|S, mGrp }, +{ 1, "&Helical Sweep\tShift+H", MNU_GROUP_HELICAL, 'H'|S, mGrp }, { 1, NULL, 0, 0, NULL }, -{ 1, "Import / Assemble...\tShift+Ctrl+I", MNU_GROUP_IMPORT, 'I'|S|C,mGrp }, +{ 1, "Import / Assemble...\tShift+I", MNU_GROUP_IMPORT, 'I'|S, mGrp }, {11, "Import Recent", MNU_GROUP_RECENT, 0, mGrp }, -{ 0, "&Request", 0, NULL }, -{ 1, "Draw in &Workplane\tW", MNU_SEL_WORKPLANE, 'W', mReq }, -{ 1, "Draw Anywhere in 3d\tQ", MNU_FREE_IN_3D, 'Q', mReq }, +{ 0, "&Sketch", 0, NULL }, +{ 1, "In &Workplane\tW", MNU_SEL_WORKPLANE, 'W', mReq }, +{ 1, "Anywhere In &3d\t3", MNU_FREE_IN_3D, '3', mReq }, { 1, NULL, 0, NULL }, { 1, "Datum &Point\tP", MNU_DATUM_POINT, 'P', mReq }, -{ 1, "&Workplane (Coordinate S&ystem)\tY", MNU_WORKPLANE, 'Y', mReq }, +{ 1, "&Workplane", MNU_WORKPLANE, 0, mReq }, { 1, NULL, 0, NULL }, { 1, "Line &Segment\tS", MNU_LINE_SEGMENT, 'S', mReq }, { 1, "&Rectangle\tR", MNU_RECTANGLE, 'R', mReq }, { 1, "&Circle\tC", MNU_CIRCLE, 'C', mReq }, { 1, "&Arc of a Circle\tA", MNU_ARC, 'A', mReq }, -{ 1, "&Cubic Segment\t3", MNU_CUBIC, '3', mReq }, +{ 1, "&Bezier Cubic Segment\tB", MNU_CUBIC, 'B', mReq }, { 1, NULL, 0, NULL }, { 1, "&Text in TrueType Font\tT", MNU_TTF_TEXT, 'T', mReq }, { 1, NULL, 0, NULL }, { 1, "To&ggle Construction\tG", MNU_CONSTRUCTION, 'G', mReq }, { 0, "&Constrain", 0, NULL }, -{ 1, "&Distance / Diameter\tShift+D", MNU_DISTANCE_DIA, 'D'|S, mCon }, -{ 1, "A&ngle\tShift+N", MNU_ANGLE, 'N'|S, mCon }, -{ 1, "Other S&upplementary Angle\tShift+U", MNU_OTHER_ANGLE, 'U'|S, mCon }, -{ 1, "Toggle &Reference Dim\tShift+R", MNU_REFERENCE, 'R'|S, mCon }, +{ 1, "&Distance / Diameter\tD", MNU_DISTANCE_DIA, 'D', mCon }, +{ 1, "A&ngle\tN", MNU_ANGLE, 'N', mCon }, +{ 1, "Other S&upplementary Angle\tU", MNU_OTHER_ANGLE, 'U', mCon }, +{ 1, "Toggle R&eference Dim\tE", MNU_REFERENCE, 'E', mCon }, { 1, NULL, 0, NULL }, -{ 1, "&Horizontal\tShift+H", MNU_HORIZONTAL, 'H'|S, mCon }, -{ 1, "&Vertical\tShift+V", MNU_VERTICAL, 'V'|S, mCon }, +{ 1, "&Horizontal\tH", MNU_HORIZONTAL, 'H', mCon }, +{ 1, "&Vertical\tV", MNU_VERTICAL, 'V', mCon }, { 1, NULL, 0, NULL }, -{ 1, "&On Point / Curve / Plane\tShift+O", MNU_ON_ENTITY, 'O'|S, mCon }, -{ 1, "E&qual Length / Radius\tShift+Q", MNU_EQUAL, 'Q'|S, mCon }, -{ 1, "Length Ra&tio\tShift+T", MNU_RATIO, 'T'|S, mCon }, -{ 1, "At &Midpoint\tShift+M", MNU_AT_MIDPOINT, 'M'|S, mCon }, -{ 1, "S&ymmetric\tShift+Y", MNU_SYMMETRIC, 'Y'|S, mCon }, -{ 1, "Para&llel\tShift+L", MNU_PARALLEL, 'L'|S, mCon }, -{ 1, "&Perpendicular\tShift+P", MNU_PERPENDICULAR, 'P'|S, mCon }, -{ 1, "Same Orient&ation\tShift+A", MNU_ORIENTED_SAME, 'A'|S, mCon }, +{ 1, "&On Point / Curve / Plane\tO", MNU_ON_ENTITY, 'O', mCon }, +{ 1, "E&qual Length / Radius\tQ", MNU_EQUAL, 'Q', mCon }, +{ 1, "Length Ra&tio\tZ", MNU_RATIO, 'Z', mCon }, +{ 1, "At &Midpoint\tM", MNU_AT_MIDPOINT, 'M', mCon }, +{ 1, "S&ymmetric\tY", MNU_SYMMETRIC, 'Y', mCon }, +{ 1, "Para&llel\tL", MNU_PARALLEL, 'L', mCon }, +{ 1, "&Perpendicular\t[", MNU_PERPENDICULAR, '[', mCon }, +{ 1, "Same Orient&ation\tX", MNU_ORIENTED_SAME, 'X', mCon }, { 1, NULL, 0, NULL }, -{ 1, "Comment\tShift+C", MNU_COMMENT, 'C'|S, mCon }, +{ 1, "Comment\t;", MNU_COMMENT, ';', mCon }, { 0, "&Help", 0, NULL }, -{ 1, "&About\t", 0, NULL }, +{ 1, "&Load License...", 0, NULL }, +{ 1, NULL, 0, NULL }, +{ 1, "Open &Website", 0, NULL }, +{ 1, "&About", 0, NULL }, { -1 }, }; diff --git a/win32/w32main.cpp b/win32/w32main.cpp index 466adacc..abe6a8fb 100644 --- a/win32/w32main.cpp +++ b/win32/w32main.cpp @@ -458,6 +458,7 @@ static BOOL ProcessKeyDown(WPARAM wParam) case VK_OEM_PLUS: c = '+'; break; case VK_OEM_MINUS: c = '-'; break; case VK_ESCAPE: c = 27; break; + case VK_OEM_1: c = ';'; break; case VK_OEM_4: c = '['; break; case VK_OEM_6: c = ']'; break; case VK_OEM_5: c = '\\'; break; diff --git a/wishlist.txt b/wishlist.txt index 478f94f9..2047b0b1 100644 --- a/wishlist.txt +++ b/wishlist.txt @@ -1,4 +1,5 @@ +get rid of the oops() calls in the mesh codes some kind of rounding / chamfer auto-generate circles and faces when lathing copy the section geometry to other end when sweeping