Вопрос

I wrote this test for DataSelection Event in my ternary plot in Techlog, and it gets too much data.

What am I doing wrong here?

In run method – subscribe to event:

void SetupTernaryPlot::run()
{
    workspace.connect(Workspace::SelectionChanged, this, SLOT(onSelectionChanged(const Slb::Techlog::SelectionChangedArgs&)));
}

This is my event handler:

void SetupTernaryPlot::onSelectionChanged(const Slb::Techlog::SelectionChangedArgs args)
{
    qWarning() << "TernaryPlot::onInteractiveSelectionChanged";
    int i=0;
    foreach (Selection selection, args.selectionsChanged())
    {
        qWarning() << "Interactive Selection " << i++ << selection.dataset().referenceVariable().rowCount() << endl; //selectlist;
    }
}

My event handler is getting too many points. How can I know what has been selected?

Это было полезно?

Решение

It is indeed possible to achieve this, even though the solution is not very elegant at this point.

If you study the "setuplogview" sample (SetupLogview::onSelectionChanged) in the package, you can find that you may use using -1 to filter out non-selected indices.

(If you have access to WAT, there is a ticket created to enhance this https://wat.grabels-fr0235.slb.com/techlog/ticket/24300)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top