mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
solve crash (no cleanup):
http://permalink.gmane.org/gmane.editors.lyx.devel/72180 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15818 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1ce9a35c4d
commit
716adc1e48
@ -909,6 +909,7 @@ void PrefConverters::updateGui()
|
|||||||
converterToCO->addItem(toqstr(cit->prettyname()));
|
converterToCO->addItem(toqstr(cit->prettyname()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
convertersLW->blockSignals(true);
|
||||||
convertersLW->clear();
|
convertersLW->clear();
|
||||||
|
|
||||||
Converters::const_iterator ccit = form_->converters().begin();
|
Converters::const_iterator ccit = form_->converters().begin();
|
||||||
@ -920,6 +921,7 @@ void PrefConverters::updateGui()
|
|||||||
form_->converters().getNumber(ccit->From->name(), ccit->To->name()));
|
form_->converters().getNumber(ccit->From->name(), ccit->To->name()));
|
||||||
}
|
}
|
||||||
convertersLW->sortItems(Qt::AscendingOrder);
|
convertersLW->sortItems(Qt::AscendingOrder);
|
||||||
|
convertersLW->blockSignals(false);
|
||||||
|
|
||||||
// restore selection
|
// restore selection
|
||||||
if (!current.isEmpty()) {
|
if (!current.isEmpty()) {
|
||||||
@ -938,13 +940,7 @@ void PrefConverters::updateGui()
|
|||||||
|
|
||||||
void PrefConverters::switch_converter(int nr)
|
void PrefConverters::switch_converter(int nr)
|
||||||
{
|
{
|
||||||
if (nr < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int const cnr = convertersLW->currentItem()->type();
|
int const cnr = convertersLW->currentItem()->type();
|
||||||
// FIXME: why is there now valid current item?
|
|
||||||
if (cnr < 0)
|
|
||||||
return;
|
|
||||||
Converter const & c(form_->converters().get(cnr));
|
Converter const & c(form_->converters().get(cnr));
|
||||||
converterFromCO->setCurrentIndex(form_->formats().getNumber(c.from));
|
converterFromCO->setCurrentIndex(form_->formats().getNumber(c.from));
|
||||||
converterToCO->setCurrentIndex(form_->formats().getNumber(c.to));
|
converterToCO->setCurrentIndex(form_->formats().getNumber(c.to));
|
||||||
@ -973,9 +969,6 @@ void PrefConverters::updateButtons()
|
|||||||
|| from.name() == to.name());
|
|| from.name() == to.name());
|
||||||
|
|
||||||
int const cnr = convertersLW->currentItem()->type();
|
int const cnr = convertersLW->currentItem()->type();
|
||||||
// FIXME: why is there now valid current item?
|
|
||||||
if (cnr < 0)
|
|
||||||
return;
|
|
||||||
Converter const & c(form_->converters().get(cnr));
|
Converter const & c(form_->converters().get(cnr));
|
||||||
string const old_command = c.command;
|
string const old_command = c.command;
|
||||||
string const old_flag = c.flags;
|
string const old_flag = c.flags;
|
||||||
@ -1497,6 +1490,7 @@ void PrefFileformats::modify_format()
|
|||||||
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
||||||
editor, flags);
|
editor, flags);
|
||||||
form_->formats().sort();
|
form_->formats().sort();
|
||||||
|
form_->converters().update(form_->formats());
|
||||||
|
|
||||||
formatsLW->setUpdatesEnabled(false);
|
formatsLW->setUpdatesEnabled(false);
|
||||||
update();
|
update();
|
||||||
|
Loading…
Reference in New Issue
Block a user