Fix crash problem while change language.
This commit is contained in:
@@ -71,6 +71,11 @@ SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f)
|
|||||||
widget->setCurrentRow(0);
|
widget->setCurrentRow(0);
|
||||||
connect(widget, &QListWidget::currentRowChanged, [=](int rowindex)
|
connect(widget, &QListWidget::currentRowChanged, [=](int rowindex)
|
||||||
{
|
{
|
||||||
|
if(rowindex < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(widget->item(rowindex)->text() == tr("Help") && stackedWidget->widget(rowindex) == nullptr)
|
if(widget->item(rowindex)->text() == tr("Help") && stackedWidget->widget(rowindex) == nullptr)
|
||||||
{
|
{
|
||||||
stackedWidget->addWidget(new HelpForm(ui->commandWidget));
|
stackedWidget->addWidget(new HelpForm(ui->commandWidget));
|
||||||
|
|||||||
Reference in New Issue
Block a user