More undo-push disabling for switching render slots.
Also added 'undo push' print in debug mode (blender -d)
This commit is contained in:
Ton Roosendaal
2011-03-12 15:09:29 +00:00
parent a416949382
commit f6b21ecf84
2 changed files with 4 additions and 1 deletions

View File

@@ -2134,7 +2134,7 @@ static int cycle_render_slot_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
/* no undo push for browsing existing */
if(ima->renders[ima->render_slot])
if(ima->renders[ima->render_slot] || ima->render_slot==ima->last_render_slot)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;

View File

@@ -80,6 +80,9 @@ void ED_undo_push(bContext *C, const char *str)
Object *obedit= CTX_data_edit_object(C);
Object *obact= CTX_data_active_object(C);
if (G.f & G_DEBUG)
printf("undo push %s\n", str);
if(obedit) {
if (U.undosteps == 0) return;