]> git.lyx.org Git - features.git/commitdiff
Fix a bug where spaces can not be appended tonameLE in the info dialoag
authorBo Peng <bpeng@lyx.org>
Sun, 3 Aug 2008 22:26:01 +0000 (22:26 +0000)
committerBo Peng <bpeng@lyx.org>
Sun, 3 Aug 2008 22:26:01 +0000 (22:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26043 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiInfo.cpp

index 3a9a1433f81c701233d5e2de1b2daf5eafea541c..4a838cc0ac8a367554e85db2627feec3b4c3592f 100644 (file)
@@ -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);
 }