summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo2005-06-01 22:01:25 +0000
committerleo2005-06-01 22:01:25 +0000
commit72bfcbe2a7b738e611f6ee67cefc7dd52657b540 (patch)
treed69f8357c87b9ea713563bf4897ba7bd6cbebba2
parent4a9460797182054c981d7d2f3fdfb113dc74be9e (diff)
Clear shortcut file name when reseting shortcuts,
Removed error dialog when trying to save a shortcut file with an empty name. git-svn-id: http://svn.leocad.org/trunk@395 c7d43263-9d01-0410-8a33-9dba5d9f93d6
-rw-r--r--win/Prefpage.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/win/Prefpage.cpp b/win/Prefpage.cpp
index c9f25b1..cfa2fcd 100644
--- a/win/Prefpage.cpp
+++ b/win/Prefpage.cpp
@@ -739,15 +739,17 @@ void CPreferencesKeyboard::SetOptions()
void CPreferencesKeyboard::GetOptions()
{
- if (SaveKeyboardShortcuts(m_strFileName))
+ if (m_strFileName.GetLength())
{
- AfxGetApp()->WriteProfileString("Settings", "Keyboard", m_strFileName);
- }
- else
- {
- AfxMessageBox("Error saving Keyboard Shortcuts file.", MB_OK | MB_ICONEXCLAMATION);
+ if (!SaveKeyboardShortcuts(m_strFileName))
+ {
+ m_strFileName = "";
+ AfxMessageBox("Error saving Keyboard Shortcuts file.", MB_OK | MB_ICONEXCLAMATION);
+ }
}
+ AfxGetApp()->WriteProfileString("Settings", "Keyboard", m_strFileName);
+
((CMainFrame*)AfxGetMainWnd())->UpdateMenuAccelerators();
}
@@ -964,6 +966,8 @@ void CPreferencesKeyboard::OnKeydlgReset()
{
ResetKeyboardShortcuts();
OnSelchangeKeydlgCmdlist();
+ m_strFileName = "";
+ UpdateData(FALSE);
}
}