Skip to content

Commit

Permalink
Fixed bug in Accordion that caused collapse() and expand() to work in…
Browse files Browse the repository at this point in the history
…correctly.
  • Loading branch information
shannah committed Mar 31, 2017
1 parent 905311a commit 2b9bef1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CodenameOne/src/com/codename1/components/Accordion.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ public void expand(Component body) {
if(autoClose) {
for (Component cc : this) {
AccordionContent c = (AccordionContent)cc;
c.openClose(body == c.body);
c.openClose(!(body == c.body));
}
} else {
for (Component cc : this) {
AccordionContent c = (AccordionContent)cc;
if(body == c.body) {
c.openClose(true);
c.openClose(false);
}
}
}
Expand All @@ -173,7 +173,7 @@ public void collapse(Component body) {
for (Component cc : this) {
AccordionContent c = (AccordionContent)cc;
if(body == c.body) {
c.openClose(false);
c.openClose(true);
}
}
}
Expand Down

0 comments on commit 2b9bef1

Please sign in to comment.