Fix T39736: Ctrl+V reports "Objects Pasted" regardless if it worked or not.
This commit is contained in:
parent
2ab9a0ff09
commit
4f00737f4b
Notes:
blender-bot
2023-02-14 10:48:30 +01:00
Referenced by issue #39736, Ctrl+V reports "Objects Pasted" regardless if it worked or not
|
@ -71,7 +71,6 @@ static int view3d_copybuffer_exec(bContext *C, wmOperator *op)
|
|||
CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
|
||||
{
|
||||
BKE_copybuffer_tag_ID(&ob->id);
|
||||
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
|
@ -99,15 +98,19 @@ static void VIEW3D_OT_copybuffer(wmOperatorType *ot)
|
|||
static int view3d_pastebuffer_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
char str[FILE_MAX];
|
||||
|
||||
|
||||
BLI_make_file_string("/", str, BLI_temporary_dir(), "copybuffer.blend");
|
||||
BKE_copybuffer_paste(C, str, op->reports);
|
||||
if (BKE_copybuffer_paste(C, str, op->reports)) {
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
|
||||
BKE_report(op->reports, RPT_INFO, "Objects pasted from buffer");
|
||||
BKE_report(op->reports, RPT_INFO, "Objects pasted from buffer");
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
BKE_report(op->reports, RPT_INFO, "No buffer to paste from");
|
||||
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
static void VIEW3D_OT_pastebuffer(wmOperatorType *ot)
|
||||
|
|
Loading…
Reference in New Issue