mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 21:15:19 +00:00
GH-1322 fix mod description ... button popping up multiple dialogs
This commit is contained in:
parent
384c03c9c5
commit
11afc61426
@ -110,7 +110,22 @@ void MCModInfoFrame::setModDescription(QString text)
|
|||||||
}
|
}
|
||||||
ui->label_ModDescription->setText(labeltext);
|
ui->label_ModDescription->setText(labeltext);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCModInfoFrame::modDescEllipsisHandler(const QString &link)
|
void MCModInfoFrame::modDescEllipsisHandler(const QString &link)
|
||||||
{
|
{
|
||||||
CustomMessageBox::selectable(this, tr(""), desc)->show();
|
if(!currentBox)
|
||||||
|
{
|
||||||
|
currentBox = CustomMessageBox::selectable(this, tr(""), desc);
|
||||||
|
connect(currentBox, &QMessageBox::finished, this, &MCModInfoFrame::boxClosed);
|
||||||
|
currentBox->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentBox->setText(desc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MCModInfoFrame::boxClosed(int result)
|
||||||
|
{
|
||||||
|
currentBox = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -38,9 +38,12 @@ public:
|
|||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void modDescEllipsisHandler(const QString& link );
|
void modDescEllipsisHandler(const QString& link );
|
||||||
|
void boxClosed(int result);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MCModInfoFrame *ui;
|
Ui::MCModInfoFrame *ui;
|
||||||
QString desc;
|
QString desc;
|
||||||
|
class QMessageBox * currentBox = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user