From 7bc451a1eedc4b670a7b1a8a7cd88b1a03cc5d70 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 31 May 2006 10:34:30 +0000 Subject: [PATCH] * src/intl.C (InitKeyMapper): reset kbmap file names if the files could not be read (bug 2604). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13971 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/intl.C | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/intl.C b/src/intl.C index 1efd0d60e7..69166a42b6 100644 --- a/src/intl.C +++ b/src/intl.C @@ -77,6 +77,12 @@ void Intl::initKeyMapper(bool on) { lyxerr[Debug::INIT] << "Initializing key mappings..." << endl; + if (trans.setPrimary(prim_lang) == -1) + prim_lang.erase(); + if (trans.setSecondary(sec_lang) == -1) + sec_lang.erase(); + trans.setCharset(lyxrc.font_norm); + if (prim_lang.empty() && sec_lang.empty()) keymapon = false; else @@ -86,8 +92,4 @@ void Intl::initKeyMapper(bool on) if (keymapon) keyMapPrim(); - - trans.setPrimary(prim_lang); - trans.setSecondary(sec_lang); - trans.setCharset(lyxrc.font_norm); }