mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
Fix crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23986 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d450553e6a
commit
b305d4c386
@ -247,7 +247,7 @@ void GuiListings::change_adaptor()
|
|||||||
|
|
||||||
string GuiListings::construct_params()
|
string GuiListings::construct_params()
|
||||||
{
|
{
|
||||||
string language = languages[languageCO->currentIndex()];
|
string language = languages[qMax(0, languageCO->currentIndex())];
|
||||||
string dialect;
|
string dialect;
|
||||||
string const dialect_gui = fromqstr(dialectCO->currentText());
|
string const dialect_gui = fromqstr(dialectCO->currentText());
|
||||||
if (dialectCO->currentIndex() > 0) {
|
if (dialectCO->currentIndex() > 0) {
|
||||||
@ -267,7 +267,7 @@ string GuiListings::construct_params()
|
|||||||
placement = fromqstr(placementLE->text());
|
placement = fromqstr(placementLE->text());
|
||||||
|
|
||||||
string numberSide;
|
string numberSide;
|
||||||
switch (numberSideCO->currentIndex()) {
|
switch (qMax(0, numberSideCO->currentIndex())) {
|
||||||
case 0:
|
case 0:
|
||||||
numberSide = "none";
|
numberSide = "none";
|
||||||
break;
|
break;
|
||||||
@ -282,12 +282,12 @@ string GuiListings::construct_params()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string stepnumber = fromqstr(numberStepLE->text());
|
string stepnumber = fromqstr(numberStepLE->text());
|
||||||
string numberfontsize = font_sizes[numberFontSizeCO->currentIndex()];
|
string numberfontsize = font_sizes[qMax(0, numberFontSizeCO->currentIndex())];
|
||||||
string firstline = fromqstr(firstlineLE->text());
|
string firstline = fromqstr(firstlineLE->text());
|
||||||
string lastline = fromqstr(lastlineLE->text());
|
string lastline = fromqstr(lastlineLE->text());
|
||||||
|
|
||||||
string fontsize = font_sizes[fontsizeCO->currentIndex()];
|
string fontsize = font_sizes[qMax(0, fontsizeCO->currentIndex())];
|
||||||
string fontstyle = font_styles[fontstyleCO->currentIndex()];
|
string fontstyle = font_styles[qMax(0, fontstyleCO->currentIndex())];
|
||||||
string basicstyle;
|
string basicstyle;
|
||||||
if (fontsize != "default")
|
if (fontsize != "default")
|
||||||
basicstyle = "\\" + fontsize;
|
basicstyle = "\\" + fontsize;
|
||||||
|
Loading…
Reference in New Issue
Block a user