aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/asset_library_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-01-13 10:45:50 -0300
committerJuan Linietsky2017-01-13 10:45:50 -0300
commit04c749a1f034c0b2256fdca0ca2675f696b490e8 (patch)
treec908a64edf3f61bba725051c8f60c6a108acbb84 /tools/editor/asset_library_editor_plugin.cpp
parenta2903fc51d1d20eba4dc451bdacbe477d6670163 (diff)
downloadgodot-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.gz
godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.zst
godot-04c749a1f034c0b2256fdca0ca2675f696b490e8.zip
New API for visibility in both CanvasItem and Spatial
visible (property) - access set_visible(bool) is_visible() is_visible_in_tree() - true when visible and parents visible show() hide() - for convenience
Diffstat (limited to '')
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index 23e1ba977..12489ada0 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -564,7 +564,7 @@ void EditorAssetLibrary::_notification(int p_what) {
}
if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
- if(!is_hidden()) {
+ if(is_visible()) {
_repository_changed(0); // Update when shown for the first time
}
}
@@ -574,8 +574,8 @@ void EditorAssetLibrary::_notification(int p_what) {
HTTPClient::Status s = request->get_http_client_status();
bool visible = s!=HTTPClient::STATUS_DISCONNECTED;
- if (visible != !load_status->is_hidden()) {
- load_status->set_hidden(!visible);
+ if (visible != load_status->is_visible()) {
+ load_status->set_visible(visible);
}
if (visible) {
@@ -599,8 +599,8 @@ void EditorAssetLibrary::_notification(int p_what) {
}
bool no_downloads = downloads_hb->get_child_count()==0;
- if (no_downloads != downloads_scroll->is_hidden()) {
- downloads_scroll->set_hidden(no_downloads);
+ if (no_downloads == downloads_scroll->is_visible()) {
+ downloads_scroll->set_visible(!no_downloads);
}
}