Commit 9d1ff035 authored by cutealien's avatar cutealien

Fix crash in meshviewer example when loading a model with closed toolbox (port from 1.5 branch).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2542 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 05255a19
......@@ -196,9 +196,13 @@ void loadModel(const c8* fn)
if (menu)
for(int item = 1; item < 6; ++item)
menu->setItemChecked(item, false);
Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_X_SCALE, true)->setText(L"1.0");
Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_Y_SCALE, true)->setText(L"1.0");
Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_Z_SCALE, true)->setText(L"1.0");
IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
if ( toolboxWnd )
{
toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText(L"1.0");
toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText(L"1.0");
toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText(L"1.0");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment