src/plugin/ui/selectable_list.cpp
void ResultsList::update() {
    clear();
    selected_element.reset();

    for(RefRecord * rr : (*results)) {
        std::shared_ptr<ResultLine> line_widget = std::make_shared<ResultLine>(&results->getLastUpdateTimestamp());
        line_widget->setRecord(rr);
        SingleAxisLayoutContainer::addNoLayout(std::move(line_widget), false, true);
    }

    if(begin() != end()) {
        selected_element = front();
    }

    recomputeLayout();
}
// for now, recreate all widgets when necessary
for now, recreate all widgets when necessary
for now recreate all widgets when necessary
void ResultsList::update() {
    clear();
    selected_element.reset();
    for(RefRecord * rr : (*results)) {
        std::shared_ptr<ResultLine> line_widget = std::make_shared<ResultLine>(&results->getLastUpdateTimestamp());
        line_widget->setRecord(rr);
        SingleAxisLayoutContainer::addNoLayout(std::move(line_widget), false, true);
    }
    if(begin() != end()) {
        selected_element = front();
    }
    recomputeLayout();
}
void ResultsList :: update ( ) { clear ( ) ; selected_element . reset ( ) ; for ( RefRecord * rr : ( * results ) ) { std :: shared_ptr < ResultLine > line_widget = std :: make_shared < ResultLine > ( & results -> getLastUpdateTimestamp ( ) ) ; line_widget -> setRecord ( rr ) ; SingleAxisLayoutContainer :: addNoLayout ( std :: move ( line_widget ) , false , true ) ; } if ( begin ( ) != end ( ) ) { selected_element = front ( ) ; } recomputeLayout ( ) ; }
for now, recreate all widgets when necessary
for now recreate all widgets when necessary