[Paraview] Custom Panel Force Accept

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Apr 19 11:41:56 EDT 2011


Try
this->proxy->UpdateVTKObjects()

does that help?

Utkarsh

On Tue, Apr 19, 2011 at 11:33 AM, Brian C. Panneton (CONTR)
<brian.c.panneton.ctr at us.army.mil> wrote:
> My slot to catch when the user checks or unchecks looks like this:
>
> [code]
> void
> MyPanel::updateSelection()
> {
>   printf("updateSelection: Start\n");
>   vtkSMStringVectorProperty* lb = dynamic_cast<vtkSMStringVectorProperty*>(
>       this->proxy()->GetProperty("SelectionList"));
>   printf("updateSelection: Elements = %i\n", lb->GetNumberOfElements());
>   for(int i = 0; i < lb->GetNumberOfElements(); i=i+2)
>   {
>       if(this->widgets.lbSelection->item(i/2)->checkState() == Qt::Checked)
>       {
>           printf("updateSelection: SetElement(%i) == Checked\n", i+1);
>           lb->SetElement(i+1, "1");
>       }
>       else
>       {
>           printf("updateSelection: SetElement(%i) == Unchecked\n", i+1);
>           lb->SetElement(i+1, "0");
>       }
>   }
>
>   this->proxy()->UpdatePropertyInformation(lb);
>   this->setModified();
>   printf("updateSelection: End\n");
> }
> [/code]
>
> So the SelectionList property is being changed. Should I not be calling
> this->proxy()->UpdatePropertyInformation(lb)?
>
> Either way I still experience the same issue.
>
> Thanks,
> Brian Panneton
>
> Utkarsh Ayachit wrote:
>>
>> If RequestData() is not being called, it implies that no property on
>> the filter/source proxy is being modified at all. Is that the case?
>>
>> Utkarsh
>>
>> On Tue, Apr 19, 2011 at 11:05 AM, Brian C. Panneton (CONTR)
>> <brian.c.panneton.ctr at us.army.mil> wrote:
>>
>>>
>>> I have a custom panel which has a QListWidget. The panel updates the
>>>
>>> widget when another panel widget gets changed. I have a SLOT which
>>> catches
>>> this change, modifies the QListWidget. I have another SLOT catch when the
>>> QListWidgetItems are checked/unchecked and calls this->setModified().
>>> Thus
>>> the accept button is highlighted. However, when you click accept,
>>> RequestData does not get called. Is there a way to catch the accept
>>> signal
>>> and force a RequestData?
>>>
>>> Thanks,
>>> Brian Panneton
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>>
>
>


More information about the ParaView mailing list