hackish fix for bug #791
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12009 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2dd07ff3d7
commit
dc3ab0244d
@ -190,3 +190,9 @@ void ModelViewWidget::elementRemoved()
|
||||
m_rtt_provider = NULL;
|
||||
IconButtonWidget::elementRemoved();
|
||||
}
|
||||
|
||||
void ModelViewWidget::clearRttProvider()
|
||||
{
|
||||
delete m_rtt_provider;
|
||||
m_rtt_provider = NULL;
|
||||
}
|
@ -84,6 +84,8 @@ namespace GUIEngine
|
||||
|
||||
/** Rotate to 'targetAngle' in degrees at given speed (in degrees per second) */
|
||||
void setRotateTo(float targetAngle, float speed);
|
||||
|
||||
void clearRttProvider();
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -255,6 +255,8 @@ public:
|
||||
core::stringw deviceName;
|
||||
std::string m_kartInternalName;
|
||||
|
||||
bool m_not_updated_yet;
|
||||
|
||||
PlayerKartWidget(KartSelectionScreen* parent,
|
||||
StateManager::ActivePlayer* associatedPlayer,
|
||||
core::recti area, const int playerID,
|
||||
@ -274,6 +276,7 @@ public:
|
||||
w_speed = 1.0f;
|
||||
h_speed = 1.0f;
|
||||
m_ready = false;
|
||||
m_not_updated_yet = true;
|
||||
|
||||
m_irrlicht_widget_ID = irrlichtWidgetID;
|
||||
|
||||
@ -604,7 +607,7 @@ public:
|
||||
|
||||
player_id_w *= 2;
|
||||
player_name_w = 0;
|
||||
|
||||
|
||||
m_model_view->setBadge(OK_BADGE);
|
||||
} // markAsReady
|
||||
|
||||
@ -706,6 +709,13 @@ public:
|
||||
kart_name_w,
|
||||
kart_name_h);
|
||||
|
||||
// When coming from the overworld, we must rebuild the preview scene at
|
||||
// least once, since the scene is being cleared by leaving the overworld
|
||||
if (m_not_updated_yet)
|
||||
{
|
||||
m_model_view->clearRttProvider();
|
||||
m_not_updated_yet = false;
|
||||
}
|
||||
} // onUpdate
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user