remove over zealous undo's on operators that don't need it.

This commit is contained in:
Campbell Barton 2011-08-19 20:25:25 +00:00
parent 90d19ad883
commit 5d88ba6165
4 changed files with 8 additions and 12 deletions

@ -787,7 +787,7 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot)
ot->poll= envmap_save_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */
/* properties */
//RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
@ -875,8 +875,6 @@ static int copy_material_exec(bContext *C, wmOperator *UNUSED(op))
copy_matcopybuf(ma);
WM_event_add_notifier(C, NC_MATERIAL, ma);
return OPERATOR_FINISHED;
}
@ -891,7 +889,7 @@ void MATERIAL_OT_copy(wmOperatorType *ot)
ot->exec= copy_material_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made to the material */
}
static int paste_material_exec(bContext *C, wmOperator *UNUSED(op))
@ -1015,8 +1013,6 @@ static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op))
copy_mtex_copybuf(id);
WM_event_add_notifier(C, NC_TEXTURE, NULL);
return OPERATOR_FINISHED;
}
@ -1039,7 +1035,7 @@ void TEXTURE_OT_slot_copy(wmOperatorType *ot)
ot->poll= copy_mtex_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made to the mtex */
}
static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))

@ -1331,7 +1331,7 @@ void IMAGE_OT_reload(wmOperatorType *ot)
ot->exec= reload_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= OPTYPE_REGISTER; /* no undo, image buffer is not handled by undo */
}
/********************** new image operator *********************/
@ -1989,7 +1989,7 @@ void IMAGE_OT_sample_line(wmOperatorType *ot)
ot->cancel= WM_gesture_straightline_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= 0; /* no undo/register since this operates on the space */
WM_operator_properties_gesture_straightline(ot, CURSOR_EDIT);
}

@ -273,7 +273,7 @@ void FILE_OT_report_missing_files(wmOperatorType *ot)
ot->exec= report_missing_files_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= 0; /* only reports so no need to undo/register */
}
/********************* find missing files operator *********************/

@ -1202,7 +1202,7 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot)
ot->poll= sequencer_edit_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= OPTYPE_REGISTER; /* no undo, the data changed is stored outside 'main' */
}
/* reload operator */
@ -2522,7 +2522,7 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
ot->poll= sequencer_edit_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ot->flag= OPTYPE_REGISTER;
/* properties */
}