Increment the version number, and add a context menu item to snap

what's hovered to the grid.

[git-p4: depot-paths = "//depot/solvespace/": change = 2042]
solver
Jonathan Westhues 2009-09-30 00:54:01 -08:00
parent 35df6bd06a
commit ea00c7e979
4 changed files with 17 additions and 1 deletions

View File

@ -385,6 +385,15 @@ void GraphicsWindow::MouseRightUp(double x, double y) {
}
}
if(gs.n == 0 && gs.constraints == 0 &&
(hover.constraint.v &&
SK.GetConstraint(hover.constraint)->type == Constraint::COMMENT) ||
(hover.entity.v &&
SK.GetEntity(hover.entity)->IsPoint()))
{
AddContextMenuItem("Snap to Grid", CMNU_SNAP_TO_GRID);
}
if(gs.n > 0 || gs.constraints > 0) {
AddContextMenuItem(NULL, CONTEXT_SEPARATOR);
AddContextMenuItem("Delete Selection", CMNU_DELETE_SEL);
@ -420,6 +429,11 @@ void GraphicsWindow::MouseRightUp(double x, double y) {
Constraint::MenuConstrain(MNU_OTHER_ANGLE);
break;
case CMNU_SNAP_TO_GRID:
ToggleSelectionStateOfHovered();
MenuEdit(MNU_SNAP_TO_GRID);
break;
case CMNU_GROUP_INFO: {
if(toggleForGroupInfo) ToggleSelectionStateOfHovered();

View File

@ -753,7 +753,7 @@ void SolveSpace::MenuHelp(int id) {
break;
case GraphicsWindow::MNU_ABOUT:
Message("This is SolveSpace version 1.4.\r\n\r\n"
Message("This is SolveSpace version 1.5.\r\n\r\n"
"For more information, see http://www.solvespace.com/\r\n\r\n"
"Built " __TIME__ " " __DATE__ ".\r\n\r\n"
"Copyright 2008-2009 Useful Subset, LLC. All Rights Reserved.");

1
ui.h
View File

@ -453,6 +453,7 @@ public:
static const int CMNU_REFERENCE_DIM = 0x106;
static const int CMNU_OTHER_ANGLE = 0x107;
static const int CMNU_STYLE_INFO = 0x108;
static const int CMNU_SNAP_TO_GRID = 0x109;
static const int CMNU_FIRST_STYLE = 0x40000000;
void ContextMenuListStyles(void);

View File

@ -2,6 +2,7 @@
multi-drag
-----
some kind of import
wireframe export
faster triangulation
interpolating splines