Fix invalid state after calling append/link operator without any items
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 3 Jul 2019 18:40:33 +0000 (20:40 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 3 Jul 2019 18:44:04 +0000 (20:44 +0200)
source/blender/windowmanager/intern/wm_files_link.c

index 1a46a4550d9ab76b8f17a1fc207d0a5676f15ccc..069dc8f441feec321703f7ad1529f5c156a39f5d 100644 (file)
@@ -464,6 +464,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
   if (lapp_data->num_items == 0) {
     /* Early out in case there is nothing to link. */
     wm_link_append_data_free(lapp_data);
+    /* Clear pre existing tag. */
+    BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
     return OPERATOR_CANCELLED;
   }