mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
made a start with script functions
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@62 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+10
-1
@@ -37,7 +37,8 @@ void handle_error(const String& e, bool allow_duplicate = true, bool now = true)
|
||||
}
|
||||
// Only show errors in the main thread
|
||||
if (!now || !wxThread::IsMain()) {
|
||||
pending_error = e;
|
||||
if (!pending_error.empty()) pending_error += _("\n\n");
|
||||
pending_error += e;
|
||||
return;
|
||||
}
|
||||
// show message
|
||||
@@ -47,3 +48,11 @@ void handle_error(const String& e, bool allow_duplicate = true, bool now = true)
|
||||
void handle_error(const Error& e, bool allow_duplicate, bool now) {
|
||||
handle_error(e.what(), allow_duplicate, now);
|
||||
}
|
||||
|
||||
void handle_pending_errors() {
|
||||
assert(wxThread::IsMain());
|
||||
if (!pending_error.empty()) {
|
||||
handle_error(pending_error);
|
||||
pending_error.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user