Skip to content

Commit 2bd05cf

Browse files
committed
Cp5 objects are "visible" even when cp5 instance is not being drawn
1 parent 7cba752 commit 2bd05cf

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

OpenBCI_GUI/Widget.pde

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,9 @@ class Widget{
294294
if (topNav.getDropdownMenuIsOpen() != previousTopNavDropdownMenuIsOpen) {
295295
for (controlP5.Controller c : listOfControllers) {
296296
if (c == null) {
297-
continue; //Gracefully skip over a controller if it is null or not visible
297+
continue; //Gracefully skip over a controller if it is null
298298
}
299-
if (c.isVisible() == false) {
300-
println(widgetTitle, " ", c, " is not visible. Skip over it!");
301-
continue;
302-
}
303-
println(widgetTitle, " ", c.getName(), " lock because of topnav == ", topNav.getDropdownMenuIsOpen());
299+
//println(widgetTitle, " ", c.getName(), " lock because of topnav == ", topNav.getDropdownMenuIsOpen());
304300
c.setLock(topNav.getDropdownMenuIsOpen());
305301
}
306302
previousTopNavDropdownMenuIsOpen = topNav.getDropdownMenuIsOpen();
@@ -311,11 +307,10 @@ class Widget{
311307
//Check against Widget Dropdowns
312308
if (dropdownIsActive != previousDropdownIsActive) {
313309
for (controlP5.Controller c : listOfControllers) {
314-
if (c == null && !c.isVisible()) {
315-
println(widgetTitle, " ", c, " is not visible. Skip over it!");
316-
continue; //Gracefully skip over a controller if it is null or not visible
310+
if (c == null) {
311+
continue; //Gracefully skip over a controller if it is null
317312
}
318-
println(widgetTitle, " ", c.getName(), " lock because of widget navbar dropdown == ", dropdownIsActive);
313+
//println(widgetTitle, " ", c.getName(), " lock because of widget navbar dropdown == ", dropdownIsActive);
319314
c.setLock(dropdownIsActive);
320315
}
321316
previousDropdownIsActive = dropdownIsActive;

0 commit comments

Comments
 (0)