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:
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
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue