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

Pandu tech pandu4tech at gmail.com
Tue Dec 13 08:57:38 EST 2011


yes I am calling.. this is my code of overloaded accept slot:

void customPanel::accept()
{
    this->setProperty("MyCommandList", editor()->toPlainText());
    pqObjectPanel::accept();
}

and customPanel is derived public from pqObjectPanel.

Regards,
Pandu.



On Mon, Dec 12, 2011 at 4:46 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20111213/e87376fe/attachment.htm>


More information about the Paraview-developers mailing list