Fix #33398: Missed undo push when script execution failed

Undo push was missed in cases when script failed to run with some error
when using Run Script in text editor. As far as i can see it makes sense
to skip undo push here only in cases live editing is enabled.

Otherwise it's indeed annoying to return to previous scene state when
debugging the script.
This commit is contained in:
Sergey Sharybin 2012-12-03 16:47:38 +00:00
parent 81a762e79f
commit a4e6da3580

@ -615,6 +615,8 @@ static int text_run_script(bContext *C, ReportList *reports)
}
BKE_report(reports, RPT_ERROR, "Python script fail, look in the console for now...");
return OPERATOR_FINISHED;
}
#else
(void)C;