add a loading window for the rune editor

This commit is contained in:
mrbesen 2023-09-02 14:34:53 +02:00
parent 5bdb21e268
commit c2d198b1c7
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 12 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include <QTextStream>
#include "clipboardpopup.h"
#include "loadingwindow.h"
#include "runeeditor.h"
RunePageList::RunePageList(QWidget* parent) : QListWidget(parent), ui(new Ui::RunePageList) {
@ -106,12 +107,22 @@ void RunePageList::editCurrentItem() {
RunePage* rp = (RunePage*) item->data(RolePointer).toULongLong();
const uint32_t id = item->data(RoleId).toUInt();
RuneEditor re;
LoadingWindow lw;
lw.setText(RunePageList::tr("Loading runes"));
lw.setProgress(0.5f);
lw.show();
// make sure the Loading window is rendered
QApplication::processEvents();
RuneEditor re;
re.setName(item->text());
QApplication::processEvents();
re.setClient(*client);
QApplication::processEvents();
re.setRunepage(*rp);
lw.close();
int result = re.exec();
// check result - save