* GuiPrefs.cpp:

- do not allow to change a format's short name if the format is used by a converter (fixes crash issue #6815).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35079 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2010-08-07 11:31:28 +00:00
parent 547773f0d0
commit a84925bebe

View File

@ -1923,8 +1923,17 @@ void PrefFileformats::on_shortcutED_textEdited(const QString & s)
void PrefFileformats::on_formatED_editingFinished()
{
string const newname = fromqstr(formatED->displayText());
if (newname == currentFormat().name())
string const oldname = currentFormat().name();
if (newname == oldname)
return;
if (form_->converters().formatIsUsed(oldname)) {
Alert::error(_("Format in use"),
_("You cannot change a format's short name "
"if the format is used by a converter. "
"Please remove the converter first."));
updateView();
return;
}
currentFormat().setName(newname);
changed();