Commit 02d89abb authored by Halla Rempt's avatar Halla Rempt
Browse files

Show the busy cursor when saving a reference image set

It's okay to block the ui, we just need to give the user feedback.

BUG:427546
(cherry picked from commit 82594005)
parent dae80193
Pipeline #234433 canceled with stage
in 28 minutes and 16 seconds
......@@ -189,6 +189,8 @@ void ToolReferenceImages::loadReferenceImages()
void ToolReferenceImages::saveReferenceImages()
{
QApplication::setOverrideCursor(Qt::BusyCursor);
auto layer = m_layer.toStrongRef();
if (!layer || layer->shapeCount() == 0) return;
......@@ -214,6 +216,7 @@ void ToolReferenceImages::saveReferenceImages()
QFile file(filename);
if (!file.open(QIODevice::WriteOnly)) {
QApplication::restoreOverrideCursor();
QMessageBox::critical(qApp->activeWindow(), i18nc("@title:window", "Krita"), i18n("Could not open '%1' for saving.", filename));
return;
}
......@@ -222,6 +225,8 @@ void ToolReferenceImages::saveReferenceImages()
bool ok = collection.save(&file);
file.close();
QApplication::restoreOverrideCursor();
if (!ok) {
QMessageBox::critical(qApp->activeWindow(), i18nc("@title:window", "Krita"), i18n("Failed to save reference images."));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment