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

Pandu tech pandu4tech at gmail.com
Mon Dec 12 11:32:02 EST 2011


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


More information about the Paraview-developers mailing list