mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
VCS: Fix empty metadata items being moved across stages
This commit is contained in:
parent
ef9885f81a
commit
c698e4f5f9
1 changed files with 7 additions and 2 deletions
|
@ -553,10 +553,15 @@ void VersionControlEditorPlugin::_item_activated(Object *p_tree) {
|
|||
void VersionControlEditorPlugin::_move_item(Tree *p_tree, TreeItem *p_item) {
|
||||
CHECK_PLUGIN_INITIALIZED();
|
||||
|
||||
if (!p_item->has_meta(SNAME("file_path"))) {
|
||||
// We only move items that are coming from files
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_tree == staged_files) {
|
||||
EditorVCSInterface::get_singleton()->unstage_file(p_item->get_meta("file_path"));
|
||||
EditorVCSInterface::get_singleton()->unstage_file(p_item->get_meta(SNAME("file_path")));
|
||||
} else {
|
||||
EditorVCSInterface::get_singleton()->stage_file(p_item->get_meta("file_path"));
|
||||
EditorVCSInterface::get_singleton()->stage_file(p_item->get_meta(SNAME("file_path")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue