Author: axeld Date: 2009-10-28 13:03:04 +0100 (Wed, 28 Oct 2009) New Revision: 33808 Changeset: http://dev.haiku-os.org/changeset/33808/haiku Modified: haiku/trunk/src/preferences/keymap/KeymapWindow.cpp Log: * _UpdateButtons() was called too early, before fCurrentMap, and fAppliedMap were initialized, causing Keymap to lose the current map. Modified: haiku/trunk/src/preferences/keymap/KeymapWindow.cpp =================================================================== --- haiku/trunk/src/preferences/keymap/KeymapWindow.cpp 2009-10-28 10:44:29 UTC (rev 33807) +++ haiku/trunk/src/preferences/keymap/KeymapWindow.cpp 2009-10-28 12:03:04 UTC (rev 33808) @@ -108,8 +108,6 @@ fKeyboardLayoutView->SetTarget(fTextControl->TextView()); fTextControl->MakeFocus(); - _UpdateButtons(); - // Make sure the user keymap directory exists BPath path; find_directory(B_USER_SETTINGS_DIRECTORY, &path); @@ -119,9 +117,8 @@ get_ref_for_path(path.Path(), &ref); BDirectory userKeymapsDir(&ref); - if (userKeymapsDir.InitCheck() != B_OK) { + if (userKeymapsDir.InitCheck() != B_OK) create_directory(path.Path(), S_IRWXU | S_IRWXG | S_IRWXO); - } BMessenger messenger(this); fOpenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, &ref, @@ -154,6 +151,8 @@ fAppliedMap = fCurrentMap; fCurrentMap.SetTarget(this, new BMessage(kMsgKeymapUpdated)); + _UpdateButtons(); + _UpdateDeadKeyMenu(); _UpdateSwitchShortcutButton();