Bug in SidebarController.IsOpen
corliss opened this issue · 0 comments
corliss commented
Looks like the code has the sense of the boolean inverted. If I set IsOpen= true
, the menu should open, not close.
public bool IsOpen
{
get { return _sidebar.IsOpen; }
set
{
_sidebar.IsOpen = value;
if (_sidebar.IsOpen)
CloseMenu();
else
OpenMenu();
}
}
Also, setting _sidebar.IsOpen
prevents the opening. So the code should simply read:
public bool IsOpen
{
get { return _sidebar.IsOpen; }
set
{
if (value)
_sidebar.OpenMenu();
else
_sidebar.CloseMenu();
}
}
Is this correct?
Thanks!