hintbox: assign missing item name for timeout bar

This commit is contained in:
2020-02-15 22:41:10 +01:00
parent 00263aa710
commit 230cbf741b

View File

@@ -231,13 +231,14 @@ void CHintBox::enableTimeOutBar(bool enable)
}else{ }else{
if (!timeout_pb){ if (!timeout_pb){
timeout_pb = new CProgressBar(); timeout_pb = new CProgressBar();
timeout_pb->setItemName("timeout_bar");
timeout_pb->setType(CProgressBar::PB_TIMESCALE); timeout_pb->setType(CProgressBar::PB_TIMESCALE);
} }
timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), TIMEOUT_BAR_HEIGHT); timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), TIMEOUT_BAR_HEIGHT);
timeout_pb->setValues(timeout/10, timeout); timeout_pb->setValues(timeout/10, timeout);
if (!timeout_pb_timer) { if (!timeout_pb_timer) {
timeout_pb_timer = new CComponentsTimer(100); timeout_pb_timer = new CComponentsTimer(100);
const string tn = cc_item_type.name + ":timeout_bar:"; const string tn = cc_item_type.name + ":" + timeout_pb->getItemName() + ":";
timeout_pb_timer->setThreadName(tn); timeout_pb_timer->setThreadName(tn);
} }
sl_tbar_on_timer.disconnect(); sl_tbar_on_timer.disconnect();