* 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/branches/BRANCH_1_6_X@35083 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2010-08-07 14:14:39 +00:00
parent acbaa1866a
commit c321723d52
2 changed files with 14 additions and 1 deletions

View File

@ -1704,8 +1704,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();

View File

@ -70,6 +70,9 @@ What's new
* USER INTERFACE
- Do not allow to rename a format's short name if the format is used by a
converter. This prevents a crash (bug 6815).
- Box dialog: only shaded boxes can have multiple paragraphs when there
is no inner box.
@ -81,6 +84,7 @@ What's new
- When undo returns to a state where the file was saved, make sure to
reset the (changed) status (bug 3733).
* DOCUMENTATION AND LOCALIZATION