Use the WaitCursor cursor while opening a file

or while evaluating a script.
This commit is contained in:
Laurent Rineau 2016-01-13 16:48:08 +01:00
parent f9cac3bbb5
commit 8eb545904d
1 changed files with 5 additions and 0 deletions

View File

@ -936,7 +936,9 @@ void MainWindow::open(QString filename)
// << filename << "\", with following content:\n"
// << program;
}
QApplication::setOverrideCursor(Qt::WaitCursor);
evaluate_script(program, filename);
QApplication::restoreOverrideCursor();
return;
}
#endif
@ -996,7 +998,10 @@ void MainWindow::open(QString filename)
settings.setValue("OFF open directory",
fileinfo.absoluteDir().absolutePath());
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Three::Scene_item* scene_item = load_item(fileinfo, find_loader(load_pair.first));
QApplication::restoreOverrideCursor();
if(scene_item != 0) {
this->addToRecentFiles(fileinfo.absoluteFilePath());
}