summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo2005-09-28 19:07:56 +0000
committerleo2005-09-28 19:07:56 +0000
commit31ee773757df1c85399cb06135b7c48129a2b327 (patch)
treed62d662f3303deb671bf946b699b88eb3a1a8dd1
parentbfde4a4c719508b3d78a413eaa7564001c1f1b1f (diff)
Removed the option to disable the piece preview, it's always enabled now.
git-svn-id: http://svn.leocad.org/trunk@422 c7d43263-9d01-0410-8a33-9dba5d9f93d6
-rw-r--r--win/LeoCAD.rc11
-rw-r--r--win/Mainfrm.cpp11
-rw-r--r--win/Piecebar.cpp28
-rw-r--r--win/Piecebar.h1
-rw-r--r--win/Prefpage.cpp11
-rw-r--r--win/Prefpage.h2
-rw-r--r--win/Stdafx.h12
-rw-r--r--win/resource.h1
8 files changed, 19 insertions, 58 deletions
diff --git a/win/LeoCAD.rc b/win/LeoCAD.rc
index 505e86f..7438ce5 100644
--- a/win/LeoCAD.rc
+++ b/win/LeoCAD.rc
@@ -367,7 +367,6 @@ BEGIN
MENUITEM "Remove Category", ID_PIECEBAR_REMOVECATEGORY
MENUITEM "Edit Category...", ID_PIECEBAR_EDITCATEGORY
MENUITEM SEPARATOR
- MENUITEM "Preview Pieces", ID_PIECEBAR_PREVIEW
MENUITEM "Group Pieces", ID_PIECEBAR_GROUP
MENUITEM "Show ComboBox", ID_PIECEBAR_COMBOBOX
MENUITEM "Show Numbers", ID_PIECEBAR_NUMBERS
@@ -987,19 +986,15 @@ BEGIN
LTEXT "Mouse sensitivity",IDC_STATIC,11,100,59,8
CONTROL "Slider1",IDC_GENDLG_MOUSE,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,76,99,31,10
- GROUPBOX "Pieces Toolbar",IDC_STATIC,146,7,92,93
+ GROUPBOX "Pieces Toolbar",IDC_STATIC,146,7,92,70
CONTROL "Show subparts",IDC_GENDLG_SUBPARTS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,152,19,81,8
CONTROL "Show piece numbers",IDC_GENDLG_NUMBERS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,152,32,81,8
- CONTROL "Enable preview",IDC_GENDLG_PREVIEW,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,152,45,81,8
- CONTROL "Auto zoom preview",IDC_GENDLG_ZOOM,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,152,58,81,8
CONTROL "Sort pieces by group",IDC_GENDLG_GROUP,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,152,71,81,8
+ BS_AUTOCHECKBOX | WS_TABSTOP,152,45,81,8
CONTROL "Show combobox",IDC_GENDLG_COMBO,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,152,84,81,8
+ BS_AUTOCHECKBOX | WS_TABSTOP,152,58,81,8
CONTROL "Check for updates on startup",IDC_GENDLG_UPDATES,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,113,119,8
END
diff --git a/win/Mainfrm.cpp b/win/Mainfrm.cpp
index 3475b07..4cf8901 100644
--- a/win/Mainfrm.cpp
+++ b/win/Mainfrm.cpp
@@ -472,9 +472,7 @@ LONG CMainFrame::OnPopupClose(UINT /*lParam*/, LONG /*wParam*/)
LONG CMainFrame::UpdateSettings(UINT /*lParam*/, LONG /*wParam*/)
{
- int i = theApp.GetProfileInt("Settings", "Piecebar Options",
- PIECEBAR_PREVIEW|PIECEBAR_GROUP|PIECEBAR_COMBO|PIECEBAR_ZOOMPREVIEW);
- m_wndPiecesBar.m_bPreview = (i & PIECEBAR_PREVIEW) != 0;
+ int i = theApp.GetProfileInt("Settings", "Piecebar Options", PIECEBAR_GROUP|PIECEBAR_COMBO);
m_wndPiecesBar.m_bSubParts = (i & PIECEBAR_SUBPARTS) != 0;
m_wndPiecesBar.m_bGroups = (i & PIECEBAR_GROUP) != 0;
m_wndPiecesBar.m_bCombo = (i & PIECEBAR_COMBO) != 0;
@@ -546,10 +544,6 @@ void CMainFrame::OnPieceBar(UINT nID)
m_wndPiecesBar.m_bGroups = !m_wndPiecesBar.m_bGroups;
m_wndPiecesBar.m_wndPiecesList.UpdateList();
} break;
- case ID_PIECEBAR_PREVIEW:
- {
- m_wndPiecesBar.m_bPreview = !m_wndPiecesBar.m_bPreview;
- } break;
case ID_PIECEBAR_NUMBERS:
{
m_wndPiecesBar.m_bNumbers = !m_wndPiecesBar.m_bNumbers;
@@ -576,7 +570,6 @@ void CMainFrame::OnPieceBar(UINT nID)
}
UINT u = 0;
- if (m_wndPiecesBar.m_bPreview) u |= PIECEBAR_PREVIEW;
if (m_wndPiecesBar.m_bSubParts) u |= PIECEBAR_SUBPARTS;
if (m_wndPiecesBar.m_bGroups) u |= PIECEBAR_GROUP;
if (m_wndPiecesBar.m_bCombo) u |= PIECEBAR_COMBO;
@@ -590,8 +583,6 @@ void CMainFrame::OnUpdatePieceBar(CCmdUI* pCmdUI)
{
case ID_PIECEBAR_GROUP:
pCmdUI->SetCheck(m_wndPiecesBar.m_bGroups); break;
- case ID_PIECEBAR_PREVIEW:
- pCmdUI->SetCheck(m_wndPiecesBar.m_bPreview); break;
case ID_PIECEBAR_NUMBERS:
pCmdUI->SetCheck(m_wndPiecesBar.m_bNumbers); break;
case ID_PIECEBAR_COMBOBOX:
diff --git a/win/Piecebar.cpp b/win/Piecebar.cpp
index bbcc808..1578721 100644
--- a/win/Piecebar.cpp
+++ b/win/Piecebar.cpp
@@ -22,9 +22,7 @@ static char THIS_FILE[] = __FILE__;
CPiecesBar::CPiecesBar()
{
- int i = AfxGetApp()->GetProfileInt("Settings", "Piecebar Options",
- PIECEBAR_PREVIEW|PIECEBAR_GROUP|PIECEBAR_COMBO|PIECEBAR_ZOOMPREVIEW);
- m_bPreview = (i & PIECEBAR_PREVIEW) != 0;
+ int i = AfxGetApp()->GetProfileInt("Settings", "Piecebar Options", PIECEBAR_GROUP|PIECEBAR_COMBO);
m_bSubParts = (i & PIECEBAR_SUBPARTS) != 0;
m_bGroups = (i & PIECEBAR_GROUP) != 0;
m_bCombo = (i & PIECEBAR_COMBO) != 0;
@@ -610,23 +608,13 @@ void CPiecesBar::OnSize(UINT nType, int cx, int cy)
else
m_wndGroupsBar.ShowWindow (SW_HIDE);
- if (m_bPreview)
- {
- m_wndSplitter.SetWindowPos (NULL, 5, m_nPreviewHeight+6, cx-10, 4, SWP_NOZORDER);
- m_wndPiecesList.SetWindowPos (NULL, 5, m_nPreviewHeight+10, cx-10, cy-off-15-m_nPreviewHeight, SWP_NOZORDER);
- m_PiecesTree.SetWindowPos (NULL, 5, m_nPreviewHeight+10, cx-10, cy-off-15-m_nPreviewHeight, SWP_NOZORDER);
- m_wndPiecePreview.SetWindowPos (NULL, 5, 5, cx-10, m_nPreviewHeight, 0);
- m_wndPiecePreview.EnableWindow (TRUE);
- m_wndPiecePreview.ShowWindow (SW_SHOW);
- m_wndSplitter.ShowWindow (SW_SHOW);
- }
- else
- {
- m_wndSplitter.ShowWindow (SW_HIDE);
- m_wndPiecesList.SetWindowPos (NULL, 5, 5, cx-10, cy-off-10, SWP_NOZORDER);
- m_wndPiecePreview.ShowWindow (SW_HIDE);
- m_wndPiecePreview.EnableWindow (FALSE);
- }
+ m_wndSplitter.SetWindowPos (NULL, 5, m_nPreviewHeight+6, cx-10, 4, SWP_NOZORDER);
+ m_wndPiecesList.SetWindowPos (NULL, 5, m_nPreviewHeight+10, cx-10, cy-off-15-m_nPreviewHeight, SWP_NOZORDER);
+ m_PiecesTree.SetWindowPos (NULL, 5, m_nPreviewHeight+10, cx-10, cy-off-15-m_nPreviewHeight, SWP_NOZORDER);
+ m_wndPiecePreview.SetWindowPos (NULL, 5, 5, cx-10, m_nPreviewHeight, 0);
+ m_wndPiecePreview.EnableWindow (TRUE);
+ m_wndPiecePreview.ShowWindow (SW_SHOW);
+ m_wndSplitter.ShowWindow (SW_SHOW);
RECT rect;
m_wndPiecesList.GetWindowRect (&rect);
diff --git a/win/Piecebar.h b/win/Piecebar.h
index c3a0b77..8682133 100644
--- a/win/Piecebar.h
+++ b/win/Piecebar.h
@@ -79,7 +79,6 @@ protected:
public:
void CreateGroupsBar();
BOOL m_bSubParts;
- BOOL m_bPreview;
BOOL m_bGroups;
BOOL m_bCombo;
BOOL m_bNumbers;
diff --git a/win/Prefpage.cpp b/win/Prefpage.cpp
index acea191..b872003 100644
--- a/win/Prefpage.cpp
+++ b/win/Prefpage.cpp
@@ -27,9 +27,7 @@ IMPLEMENT_DYNCREATE(CPreferencesKeyboard, CPropertyPage)
CPreferencesGeneral::CPreferencesGeneral() : CPropertyPage(CPreferencesGeneral::IDD)
{
//{{AFX_DATA_INIT(CPreferencesGeneral)
- m_bZoom = FALSE;
m_bSubparts = FALSE;
- m_bPreview = FALSE;
m_nSaveTime = 0;
m_bNumbers = FALSE;
m_bGroup = FALSE;
@@ -50,9 +48,7 @@ void CPreferencesGeneral::DoDataExchange(CDataExchange* pDX)
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPreferencesGeneral)
DDX_Control(pDX, IDC_GENDLG_MOUSE, m_ctlMouse);
- DDX_Check(pDX, IDC_GENDLG_ZOOM, m_bZoom);
DDX_Check(pDX, IDC_GENDLG_SUBPARTS, m_bSubparts);
- DDX_Check(pDX, IDC_GENDLG_PREVIEW, m_bPreview);
DDX_Text(pDX, IDC_GENDLG_SAVETIME, m_nSaveTime);
DDV_MinMaxInt(pDX, m_nSaveTime, 1, 60);
DDX_Check(pDX, IDC_GENDLG_NUMBERS, m_bNumbers);
@@ -93,14 +89,11 @@ void CPreferencesGeneral::SetOptions(int nSaveInterval, int nMouse, const char*
m_strUser = strUser;
m_Updates = AfxGetApp()->GetProfileInt("Settings", "CheckUpdates", 1);
- int i = AfxGetApp()->GetProfileInt("Settings", "Piecebar Options",
- PIECEBAR_PREVIEW|PIECEBAR_GROUP|PIECEBAR_COMBO|PIECEBAR_ZOOMPREVIEW);
- m_bPreview = (i & PIECEBAR_PREVIEW) != 0;
+ int i = AfxGetApp()->GetProfileInt("Settings", "Piecebar Options", PIECEBAR_GROUP|PIECEBAR_COMBO);
m_bSubparts = (i & PIECEBAR_SUBPARTS) != 0;
m_bGroup = (i & PIECEBAR_GROUP) != 0;
m_bCombo = (i & PIECEBAR_COMBO) != 0;
m_bNumbers = (i & PIECEBAR_PARTNUMBERS) != 0;
- m_bZoom = (i & PIECEBAR_ZOOMPREVIEW) != 0;
}
void CPreferencesGeneral::GetOptions(int* nSaveTime, int* nMouse, char* strFolder, char* strUser)
@@ -112,12 +105,10 @@ void CPreferencesGeneral::GetOptions(int* nSaveTime, int* nMouse, char* strFolde
strcpy(strUser, m_strUser);
int i = 0;
- if (m_bPreview) i |= PIECEBAR_PREVIEW;
if (m_bSubparts) i |= PIECEBAR_SUBPARTS;
if (m_bGroup) i |= PIECEBAR_GROUP;
if (m_bCombo) i |= PIECEBAR_COMBO;
if (m_bNumbers) i |= PIECEBAR_PARTNUMBERS;
- if (m_bZoom) i |= PIECEBAR_ZOOMPREVIEW;
AfxGetApp()->WriteProfileInt("Settings", "Piecebar Options", i);
AfxGetApp()->WriteProfileInt("Settings", "CheckUpdates", m_Updates);
diff --git a/win/Prefpage.h b/win/Prefpage.h
index a2534cc..2dda1e1 100644
--- a/win/Prefpage.h
+++ b/win/Prefpage.h
@@ -24,9 +24,7 @@ public:
//{{AFX_DATA(CPreferencesGeneral)
enum { IDD = IDD_PREFGENERAL };
CSliderCtrl m_ctlMouse;
- BOOL m_bZoom;
BOOL m_bSubparts;
- BOOL m_bPreview;
int m_nSaveTime;
BOOL m_bNumbers;
BOOL m_bGroup;
diff --git a/win/Stdafx.h b/win/Stdafx.h
index a9c6b96..7614a2c 100644
--- a/win/Stdafx.h
+++ b/win/Stdafx.h
@@ -47,12 +47,12 @@
#define PRINT_BORDER 0x008
// Piecebar settings
-#define PIECEBAR_PREVIEW 0x01 // Show piece preview
-#define PIECEBAR_SUBPARTS 0x02 // Show subparts
-#define PIECEBAR_GROUP 0x04 // Group pieces
-#define PIECEBAR_ZOOMPREVIEW 0x08 // Zoom piece preview
-#define PIECEBAR_COMBO 0x10 // Show combobox
-#define PIECEBAR_PARTNUMBERS 0x20 // Show part numbers
+//#define PIECEBAR_PREVIEW 0x01 // Show piece preview
+#define PIECEBAR_SUBPARTS 0x02 // Show subparts
+#define PIECEBAR_GROUP 0x04 // Group pieces
+//#define PIECEBAR_ZOOMPREVIEW 0x08 // Zoom piece preview
+#define PIECEBAR_COMBO 0x10 // Show combobox
+#define PIECEBAR_PARTNUMBERS 0x20 // Show part numbers
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
diff --git a/win/resource.h b/win/resource.h
index 6104707..f32e81e 100644
--- a/win/resource.h
+++ b/win/resource.h
@@ -496,7 +496,6 @@
#define ID_FILE_EXPORT_LDRAW 32834
#define ID_FILE_EXPORT_POVRAY 32835
#define ID_PIECEBAR_GROUP 32837
-#define ID_PIECEBAR_PREVIEW 32838
#define ID_PIECEBAR_NUMBERS 32839
#define ID_PIECEBAR_COMBOBOX 32840
#define ID_PIECEBAR_SUBPARTS 32841