Fix T42760: Drag-to-add feature fails in a case.

We have to unset 'name' when we set 'filepath', and vice-versa.
This commit is contained in:
Bastien Montagne 2014-11-30 15:05:03 +01:00
parent b12dbdd93b
commit 503dbb65c0
Notes: blender-bot 2023-02-14 09:46:04 +01:00
Referenced by issue #42760, Drag-to-add feature fails in a case
1 changed files with 4 additions and 2 deletions

View File

@ -702,10 +702,12 @@ static void node_id_path_drop_copy(wmDrag *drag, wmDropBox *drop)
if (id) {
RNA_string_set(drop->ptr, "name", id->name + 2);
RNA_struct_property_unset(drop->ptr, "filepath");
}
if (drag->path[0]) {
else if (drag->path[0]) {
RNA_string_set(drop->ptr, "filepath", drag->path);
}
RNA_struct_property_unset(drop->ptr, "name");
}
}
/* this region dropbox definition */