문제

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