Skip to content
Snippets Groups Projects
Commit 7c3c4604 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

don't allow to clear project when the lock is set, or when onelab is busy

parent 62e81348
No related branches found
No related tags found
No related merge requests found
...@@ -170,6 +170,10 @@ static void file_open_recent_cb(Fl_Widget *w, void *data) ...@@ -170,6 +170,10 @@ static void file_open_recent_cb(Fl_Widget *w, void *data)
static void file_clear_cb(Fl_Widget *w, void *data) static void file_clear_cb(Fl_Widget *w, void *data)
{ {
if(CTX::instance()->lock || FlGui::instance()->onelab->isBusy()) {
Msg::Info("I'm busy! Ask me that later...");
return;
}
ClearProject(); ClearProject();
onelab_cb(0, (void*)"reset"); // this will call OpenProject onelab_cb(0, (void*)"reset"); // this will call OpenProject
drawContext::global()->draw(); drawContext::global()->draw();
...@@ -543,6 +547,11 @@ static void geometry_edit_cb(Fl_Widget *w, void *data) ...@@ -543,6 +547,11 @@ static void geometry_edit_cb(Fl_Widget *w, void *data)
void geometry_reload_cb(Fl_Widget *w, void *data) void geometry_reload_cb(Fl_Widget *w, void *data)
{ {
if(CTX::instance()->lock || FlGui::instance()->onelab->isBusy()) {
Msg::Info("I'm busy! Ask me that later...");
return;
}
std::string fileName = GModel::current()->getFileName(); std::string fileName = GModel::current()->getFileName();
ClearProject(); ClearProject();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment