Merge pull request #30935 from YeldhamDev/gdnative_plugin_fix

Fix 'GDNativeLibrary' editor being incorrectly opened
This commit is contained in:
Rémi Verschelde 2019-07-29 21:38:37 +02:00 committed by GitHub
commit adffd9aaef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,11 +396,9 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
void GDNativeLibraryEditorPlugin::edit(Object *p_node) {
if (Object::cast_to<GDNativeLibrary>(p_node)) {
library_editor->edit(Object::cast_to<GDNativeLibrary>(p_node));
library_editor->show();
} else
library_editor->hide();
Ref<GDNativeLibrary> new_library = Object::cast_to<GDNativeLibrary>(p_node);
if (new_library.is_valid())
library_editor->edit(new_library);
}
bool GDNativeLibraryEditorPlugin::handles(Object *p_node) const {