From c2d198b1c7cbf657394447eeabbeeb40a4609495 Mon Sep 17 00:00:00 2001 From: mrbesen Date: Sat, 2 Sep 2023 14:34:53 +0200 Subject: [PATCH] add a loading window for the rune editor --- src/runepagelist.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/runepagelist.cpp b/src/runepagelist.cpp index 0f94f28..27904e0 100644 --- a/src/runepagelist.cpp +++ b/src/runepagelist.cpp @@ -8,6 +8,7 @@ #include #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