Fix #1499
This commit is contained in:
parent
27306018d5
commit
016ba2caf3
@ -722,15 +722,21 @@ EventPropagation RibbonWidget::transmitEvent(Widget* w,
|
||||
// ----------------------------------------------------------------------------
|
||||
void RibbonWidget::setLabel(const unsigned int id, irr::core::stringw new_name)
|
||||
{
|
||||
// This method should only be called AFTER a widget is added
|
||||
assert(m_element != NULL);
|
||||
if (m_element == NULL)
|
||||
{
|
||||
// before adding
|
||||
m_children[id].setText(new_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
// after adding
|
||||
// ignore this call for ribbons without labels
|
||||
if (m_labels.size() == 0) return;
|
||||
|
||||
// ignore this call for ribbons without labels
|
||||
if (m_labels.size() == 0) return;
|
||||
|
||||
assert(id < m_labels.size());
|
||||
m_labels[id].setText( new_name.c_str() );
|
||||
m_text = new_name;
|
||||
assert(id < m_labels.size());
|
||||
m_labels[id].setText(new_name.c_str());
|
||||
//m_text = new_name;
|
||||
}
|
||||
} // setLabel
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -134,12 +134,14 @@ void GPInfoScreen::beforeAddingWidget()
|
||||
RibbonWidget* ribbonButtons = getWidget<RibbonWidget>("buttons");
|
||||
int id_continue_button = ribbonButtons->findItemNamed("continue");
|
||||
ribbonButtons->setItemVisible(id_continue_button, saved_gp != NULL);
|
||||
ribbonButtons->setLabel(id_continue_button, _("Continue saved GP"));
|
||||
}
|
||||
else
|
||||
{
|
||||
RibbonWidget* ribbonButtons = getWidget<RibbonWidget>("buttons");
|
||||
int id_continue_button = ribbonButtons->findItemNamed("continue");
|
||||
ribbonButtons->setItemVisible(id_continue_button, true);
|
||||
ribbonButtons->setLabel(id_continue_button, _("Reload"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user