Fix T39736: Ctrl+V reports "Objects Pasted" regardless if it worked or not.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user