~aleteoryx/muditaos

4689c3909dce897740e785d69f42006615502cf4 — Tigran Soghbatyan 4 years ago fd01dad
[BH-1083] Fix TimeListItem on inputEvent crush

TimeSetFmtSpinner is misbehaving when editing timeFormat
after the object was created. Pass timeFormat in a constructor
1 files changed, 1 insertions(+), 3 deletions(-)

M products/BellHybrid/apps/common/src/widgets/ListItems.cpp
M products/BellHybrid/apps/common/src/widgets/ListItems.cpp => products/BellHybrid/apps/common/src/widgets/ListItems.cpp +1 -3
@@ 186,11 186,9 @@ namespace gui
                               const std::string &topDescription)
        : BellSideListItemWithCallbacks(topDescription)
    {
        auto centerBox = dynamic_cast<HBox *>(body->getCenterBox());
        spinner        = new TimeSetFmtSpinner(centerBox);
        spinner = new TimeSetFmtSpinner(body->getCenterBox(), 0, 0, 0, 0, timeFormat);
        spinner->setMaximumSize(::style::bell_base_layout::w, ::style::bell_base_layout::h);
        spinner->setFont(focusFont, noFocusFont);
        spinner->setTimeFormat(timeFormat);
        spinner->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));

        getValue = [&model, this]() { model.setValue(spinner->getTime()); };