[Paraview-developers] Need help on pqObjectPanel and accept slot

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Dec 12 11:46:54 EST 2011


Are you calling this->Superclass::accept() in your overload of the
accept() slot?

Utkarsh

On Mon, Dec 12, 2011 at 11:32 AM, Pandu tech <pandu4tech at gmail.com> wrote:
> Hi All,
>
> In Paraview,  my class inherited from pqObjectPanel and I reimplemented
> accept slot and it is being called twice.
>
> setModified is called when text is changed that updates the Apply button but
> clicking the apply button calls the panel accept function twice
>
> code: file : pqObjectInspectorWidget.cxx
>
>     if (this->ShowOnAccept && modified_state == pqProxy::UNINITIALIZED)
>       {
>       proxies_to_show.insert(refProxy);
>       }
>     if (modified_state != pqProxy::UNMODIFIED)
>       {
>       panel->accept();   // PANEL FIRST UPDATED HERE
>       }
>     }
>
>   if (this->CurrentPanel)
>     {
>     pqProxy* refProxy = this->CurrentPanel->referenceProxy();
>     int modified_state = refProxy->modifiedState();
>     if (this->ShowOnAccept && modified_state == pqProxy::UNINITIALIZED)
>       {
>       proxies_to_show.insert(refProxy);
>       }
>     this->CurrentPanel->accept();  // AND THEN AGAIN HERE
>     }
>
> Need ur suggestions and help in fixing this..
>
> Regards..
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list