Skip to content

Commit

Permalink
Fix for Misc elements issues #216 Item 1.a (Add cast utility that dea…
Browse files Browse the repository at this point in the history
…ls with indirect elements)
  • Loading branch information
djowel committed Aug 26, 2020
1 parent c981efd commit e8a76d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/element/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <elements/element/composite.hpp>
#include <elements/element/traversal.hpp>
#include <elements/element/port.hpp>
#include <elements/element/traversal.hpp>

namespace cycfi { namespace elements
{
Expand Down Expand Up @@ -311,7 +312,7 @@ namespace cycfi { namespace elements
i += down? +1 : -1
)
{
auto e = dynamic_cast<basic_menu_item_element*>(&c->at(i));
auto e = find_element<basic_menu_item_element*>(&c->at(i));
if (e && e->is_enabled())
{
if (e == this)
Expand Down

0 comments on commit e8a76d3

Please sign in to comment.