summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/keyboard.cpp1
-rw-r--r--common/project.cpp14
-rw-r--r--common/typedefs.h1
-rw-r--r--win/LeoCAD.rc40
-rw-r--r--win/Mainfrm.cpp11
-rw-r--r--win/resource.h20
6 files changed, 38 insertions, 49 deletions
diff --git a/common/keyboard.cpp b/common/keyboard.cpp
index 5251f22..c001af0 100644
--- a/common/keyboard.cpp
+++ b/common/keyboard.cpp
@@ -80,7 +80,6 @@ LC_KEYBOARD_COMMAND DefaultKeyboardShortcuts[] =
// { LC_TOOLBAR_ADDKEYS, "", 0, 0, 0 },
// { LC_TOOLBAR_SNAPMENU, "", 0, 0, 0 },
// { LC_TOOLBAR_LOCKMENU, "", 0, 0, 0 },
-// { LC_TOOLBAR_SNAPMOVEMENU, "", 0, 0, 0 },
// { LC_TOOLBAR_FASTRENDER, "", 0, 0, 0 },
// { LC_TOOLBAR_BACKGROUND, "", 0, 0, 0 },
{ LC_VIEW_STEP_INSERT, "Step Insert", 0, 0, 0 },
diff --git a/common/project.cpp b/common/project.cpp
index ec6355f..e1e78b7 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -6332,20 +6332,6 @@ void Project::HandleCommand(LC_COMMANDS id, unsigned long nParam)
SystemUpdateSnap(m_nSnap);
} break;
- case LC_TOOLBAR_SNAPMOVEMENU:
- {
- if (nParam < 11)
- m_nMoveSnap = (unsigned short)nParam;
- else
- {
- if (nParam == 19)
- m_nMoveSnap = 100;
- else
- m_nMoveSnap = ((unsigned short)(nParam - 10)*5 + 10) | (m_nMoveSnap & ~0xff);
- }
- SystemUpdateSnap(m_nMoveSnap, m_nAngleSnap);
- } break;
-
case LC_TOOLBAR_BACKGROUND:
case LC_TOOLBAR_FASTRENDER:
{
diff --git a/common/typedefs.h b/common/typedefs.h
index 0ce4dc5..51c1283 100644
--- a/common/typedefs.h
+++ b/common/typedefs.h
@@ -93,7 +93,6 @@ typedef enum
LC_TOOLBAR_ADDKEYS,
LC_TOOLBAR_SNAPMENU,
LC_TOOLBAR_LOCKMENU,
- LC_TOOLBAR_SNAPMOVEMENU,
LC_TOOLBAR_FASTRENDER,
LC_TOOLBAR_BACKGROUND,
LC_EDIT_MOVEXY_SNAP_0,
diff --git a/win/LeoCAD.rc b/win/LeoCAD.rc
index f5dabf4..c029ba6 100644
--- a/win/LeoCAD.rc
+++ b/win/LeoCAD.rc
@@ -455,26 +455,26 @@ BEGIN
END
POPUP "7"
BEGIN
- MENUITEM "1/2", ID_SNAP_12
- MENUITEM "1", ID_SNAP_1
- MENUITEM "2", ID_SNAP_2
- MENUITEM "3", ID_SNAP_3
- MENUITEM "4", ID_SNAP_4
- MENUITEM "5", ID_SNAP_5
- MENUITEM "6", ID_SNAP_6
- MENUITEM "7", ID_SNAP_7
- MENUITEM "8", ID_SNAP_8
- MENUITEM "9", ID_SNAP_9
- MENUITEM "10", ID_SNAP_10, MENUBREAK
- MENUITEM "15", ID_SNAP_15
- MENUITEM "20", ID_SNAP_20
- MENUITEM "25", ID_SNAP_25
- MENUITEM "30", ID_SNAP_30
- MENUITEM "35", ID_SNAP_35
- MENUITEM "40", ID_SNAP_40
- MENUITEM "45", ID_SNAP_45
- MENUITEM "50", ID_SNAP_50
- MENUITEM "100", ID_SNAP_100
+ MENUITEM "None", ID_SNAP_0
+ MENUITEM "1/20 Stud", ID_SNAP_1
+ MENUITEM "1/4 Stud", ID_SNAP_2
+ MENUITEM "1/2 Stud", ID_SNAP_3
+ MENUITEM "1 Stud", ID_SNAP_4
+ MENUITEM "2 Studs", ID_SNAP_5
+ MENUITEM "3 Studs", ID_SNAP_6
+ MENUITEM "4 Studs", ID_SNAP_7
+ MENUITEM "8 Studs", ID_SNAP_8
+ MENUITEM "16 Studs", ID_SNAP_9
+ MENUITEM "None", ID_SNAP_10, MENUBREAK
+ MENUITEM "1/20 Stud", ID_SNAP_11
+ MENUITEM "1/4 Stud", ID_SNAP_12
+ MENUITEM "1 Flat", ID_SNAP_13
+ MENUITEM "1/2 Stud", ID_SNAP_14
+ MENUITEM "1 Stud", ID_SNAP_15
+ MENUITEM "1 Brick", ID_SNAP_16
+ MENUITEM "2 Bricks", ID_SNAP_17
+ MENUITEM "4 Bricks", ID_SNAP_18
+ MENUITEM "8 Bricks", ID_SNAP_19
END
POPUP "8"
BEGIN
diff --git a/win/Mainfrm.cpp b/win/Mainfrm.cpp
index a1cb1fc..1f487bd 100644
--- a/win/Mainfrm.cpp
+++ b/win/Mainfrm.cpp
@@ -681,9 +681,15 @@ BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
{
int nID = LOWORD(wParam);
- if (nID >= ID_SNAP_12 && nID <= ID_SNAP_100)
+ if (nID >= ID_SNAP_0 && nID <= ID_SNAP_9)
{
- project->HandleCommand(LC_TOOLBAR_SNAPMOVEMENU, nID - ID_SNAP_12);
+ project->HandleCommand((LC_COMMANDS)(LC_EDIT_MOVEXY_SNAP_0 + nID - ID_SNAP_0), 0);
+ return TRUE;
+ }
+
+ if (nID >= ID_SNAP_10 && nID <= ID_SNAP_19)
+ {
+ project->HandleCommand((LC_COMMANDS)(LC_EDIT_MOVEZ_SNAP_0 + nID - ID_SNAP_10), 0);
return TRUE;
}
@@ -1336,7 +1342,6 @@ void CMainFrame::UpdateMenuAccelerators()
0, // LC_TOOLBAR_ADDKEYS
0, // LC_TOOLBAR_SNAPMENU
0, // LC_TOOLBAR_LOCKMENU
- 0, // LC_TOOLBAR_SNAPMOVEMENU
0, // LC_TOOLBAR_FASTRENDER
0, // LC_TOOLBAR_BACKGROUND
0, // LC_EDIT_MOVE_SNAP_0
diff --git a/win/resource.h b/win/resource.h
index 2a111e9..48f5f9f 100644
--- a/win/resource.h
+++ b/win/resource.h
@@ -615,7 +615,7 @@
#define ID_LIBDLG_PIECE_NEW 33069
#define ID_EDITOR_INLINE_ALL 33086
#define ID_LIBDLG_PIECE_DELETE 33087
-#define ID_SNAP_12 33088
+#define ID_SNAP_0 33088
#define ID_SNAP_1 33089
#define ID_SNAP_2 33090
#define ID_SNAP_3 33091
@@ -626,15 +626,15 @@
#define ID_SNAP_8 33096
#define ID_SNAP_9 33097
#define ID_SNAP_10 33098
-#define ID_SNAP_15 33099
-#define ID_SNAP_20 33100
-#define ID_SNAP_25 33101
-#define ID_SNAP_30 33102
-#define ID_SNAP_35 33103
-#define ID_SNAP_40 33104
-#define ID_SNAP_45 33105
-#define ID_SNAP_50 33106
-#define ID_SNAP_100 33107
+#define ID_SNAP_11 33099
+#define ID_SNAP_12 33100
+#define ID_SNAP_13 33101
+#define ID_SNAP_14 33102
+#define ID_SNAP_15 33103
+#define ID_SNAP_16 33104
+#define ID_SNAP_17 33105
+#define ID_SNAP_18 33106
+#define ID_SNAP_19 33107
#define ID_FILE_TERRAINEDITOR 33108
#define ID_TERDLG_FILE_SAVEAS 33112
#define ID_TERDLG_EDIT_RANDOM 33113