From 4fa66a8d0a6ca73398b90cd66422dd8f58e57310 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Sun, 3 Aug 2008 22:26:01 +0000 Subject: [PATCH] Fix a bug where spaces can not be appended tonameLE in the info dialoag git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26043 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiInfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiInfo.cpp b/src/frontends/qt4/GuiInfo.cpp index 3a9a1433f8..4a838cc0ac 100644 --- a/src/frontends/qt4/GuiInfo.cpp +++ b/src/frontends/qt4/GuiInfo.cpp @@ -125,7 +125,10 @@ void GuiInfo::paramsToDialog() nameLE->blockSignals(true); int type = findToken(info_types, fromqstr(type_)); typeCO->setCurrentIndex(type >= 0 ? type : 0); - nameLE->setText(name_); + // Without this test, 'math-insert' (name_) will replace 'math-insert ' + // in nameLE and effectively disallow the input of spaces after a LFUN. + if (nameLE->text().trimmed() != name_) + nameLE->setText(name_); typeCO->blockSignals(false); nameLE->blockSignals(false); } -- 2.39.2