Use an unique opengl context

This commit is contained in:
Enrico Turri 2018-10-04 10:41:11 +02:00
parent f31cf684cb
commit 96745e12d7
8 changed files with 91 additions and 7 deletions

View file

@ -339,13 +339,13 @@ void GLToolbar::do_action(unsigned int item_id)
item->set_state(GLToolbarItem::Hover);
m_parent.render();
item->do_action(m_parent.widget());
item->do_action(m_parent.get_wxglcanvas());
}
else
{
item->set_state(GLToolbarItem::HoverPressed);
m_parent.render();
item->do_action(m_parent.widget());
item->do_action(m_parent.get_wxglcanvas());
if (item->get_state() != GLToolbarItem::Disabled)
{
// the item may get disabled during the action, if not, set it back to hover state