Fixed a FIXME (memory leak) + removed a few annoying debug prints
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4200 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
f90833cb11
commit
ef77d9906b
@ -139,7 +139,7 @@ EventPropagation EventHandler::onGUIEvent(const SEvent& event)
|
|||||||
Widget* w = GUIEngine::getWidget(id);
|
Widget* w = GUIEngine::getWidget(id);
|
||||||
if (w == NULL) break;
|
if (w == NULL) break;
|
||||||
|
|
||||||
std::cout << "==== irrlicht widget focused : " << w->m_properties[PROP_ID] << std::endl;
|
//std::cout << "==== irrlicht widget focused : " << w->m_properties[PROP_ID] << std::endl;
|
||||||
|
|
||||||
// forbid list for gaining "irrLicht focus", then they will process key events and
|
// forbid list for gaining "irrLicht focus", then they will process key events and
|
||||||
// we don't want that since we do our own custom processing for keys
|
// we don't want that since we do our own custom processing for keys
|
||||||
|
@ -72,9 +72,10 @@ void DynamicRibbonWidget::add()
|
|||||||
// FIXME? these arrow buttons are outside of the widget's boundaries
|
// FIXME? these arrow buttons are outside of the widget's boundaries
|
||||||
if (m_left_widget != NULL)
|
if (m_left_widget != NULL)
|
||||||
{
|
{
|
||||||
// FIXME - do proper memory management, find why it crashes when i try to clean-up
|
m_left_widget->elementRemoved();
|
||||||
//delete m_left_widget;
|
m_right_widget->elementRemoved();
|
||||||
//delete m_right_widget;
|
delete m_left_widget;
|
||||||
|
delete m_right_widget;
|
||||||
}
|
}
|
||||||
m_left_widget = new Widget();
|
m_left_widget = new Widget();
|
||||||
m_right_widget = new Widget();
|
m_right_widget = new Widget();
|
||||||
|
@ -319,7 +319,7 @@ EventPropagation RibbonWidget::focused(const int playerID)
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
EventPropagation RibbonWidget::mouseHovered(Widget* child, const int mousePlayerID)
|
EventPropagation RibbonWidget::mouseHovered(Widget* child, const int mousePlayerID)
|
||||||
{
|
{
|
||||||
std::cout << "RibbonWidget::mouseHovered " << mousePlayerID << std::endl;
|
//std::cout << "RibbonWidget::mouseHovered " << mousePlayerID << std::endl;
|
||||||
const int subbuttons_amount = m_children.size();
|
const int subbuttons_amount = m_children.size();
|
||||||
|
|
||||||
if (m_ribbon_type == RIBBON_COMBO)
|
if (m_ribbon_type == RIBBON_COMBO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user