<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    You should get a parameter containing the composer that is being
    deleted with composerWillBeRemoved signal. Try to use that to infer
    which composer has been removed. As the signal name indicates, at
    the time it is emitted, the composer is not deleted yet.<br>
    As an alternative you may make the connection with
    Qt.QueuedConnection. It is possible that with this connection style
    you will receive the signal after deletion and are able to continue
    using your current update method.<br>
    <br>
    Best<br>
    Matthias<br>
    <br>
    <div class="moz-cite-prefix">On 03/31/2015 02:04 PM, Junior Delaz
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAECJsSp2H3rPemvYKZWhUh=Jzur3z+GVCs1NO2P=+9kWn_w3iw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>Matthias,<br>
                  </div>
                  Thanks. I just give it a try it and all goes well with
                  composerAdded. <br>
                </div>
                But not really well with composerWillBeRemoved signal.
                The first deletion in the composer manager does nothing
                and deleting a second composer does remove the first one
                in my list. and so on...<br>
                My update function should be rewritten I think.  I'll
                try to see how improving it and may (surely) ask again
                for help (if needed).<br>
              </div>
              <br>
            </div>
          </div>
          While seeking information about composerWillBeRemoved, I found
          a composerRemoved [1] [2] signal (that doesn't appear in the
          API doc) and without being able to use it. :(<br>
          [1] <a moz-do-not-send="true"
href="https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp">https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp</a>
          (line 48<br>
          [2] <a moz-do-not-send="true"
            href="https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp">https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp</a>
          (line 5601)<br>
          <br>
        </div>
        Another thing that may not be related : what the
        deletePrintComposers function (<a moz-do-not-send="true"
          href="https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp">https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp</a>
        line 5698) is for?<br>
        <br>
        Thanks again for the clue.</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2015-03-31 9:43 GMT+02:00 Matthias Kuhn
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:matthias@opengis.ch" target="_blank">matthias@opengis.ch</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> QgisInterface (iface)
              has a composerAdded and composerWillBeRemoved signal.<br>
              <br>
              Did you try to connect to these?<br>
              <br>
              Best,<br>
              Matthias
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 03/31/2015 09:34 AM, Junior wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div style="font-family:'Calibri','sans-serif'">
                      <div>Hi all, Luca</div>
                      <div>Thanks for answering. But i already have an
                        update function that I linked to an update list
                        button. I even linked it to the icon on the
                        toolbar so that when user calls foreground the
                        dialog it's already updated.</div>
                      <div>The case I'd like to manage: user can open
                        plugin dialog and composer manager. The two
                        dialogs are visible (to the eyes) even
                        though composer manager is the one at
                        foreground. He makes changes and directly
                        clicked on the plugin dialog. He should update
                        list but if he forgets and executes, this may
                        lead to bug I don't want to / can't yet manage.</div>
                      <div>Reason why I want to ensure that list is
                        always up to date when he interacts with the
                        dialog</div>
                      <div><br>
                      </div>
                      <div>Envoyé depuis mon HTC</div>
                      <br>
                      <div>----- Reply message -----<br>
                        De : "Luca Manganelli" <a
                          moz-do-not-send="true"
                          href="mailto:luca76@gmail.com" target="_blank"><luca76@gmail.com></a><br>
                        Pour :<br>
                        Cc : <a moz-do-not-send="true"
                          href="mailto:qgis-user@lists.osgeo.org"
                          target="_blank">"qgis-user@lists.osgeo.org"</a>
                        <a moz-do-not-send="true"
                          href="mailto:qgis-user@lists.osgeo.org"
                          target="_blank"><qgis-user@lists.osgeo.org></a>,
                        "qgis-developer" <a moz-do-not-send="true"
                          href="mailto:qgis-developer@lists.osgeo.org"
                          target="_blank"><qgis-developer@lists.osgeo.org></a><br>
                        Objet : [Qgis-developer] [Qgis-user] Pyqt4 :
                        which signal is sent when dialog comes to
                        foreground?<br>
                        Date : mar., mars 31, 2015 07:56</div>
                    </div>
                    <br>
                    <pre style="word-wrap:break-word;white-space:pre-wrap">On Mon, Mar 30, 2015 at 6:12 PM, Junior Delaz <a moz-do-not-send="true" href="mailto:delazj@gmail.com" target="_blank"><delazj@gmail.com></a> wrote:
> I've read about defining a custom showEvent function but can't understand
> where to put it and what inside.
> If somebody can give some tips...

You could add a "Update list" button
_______________________________________________
Qgis-developer mailing list
<a moz-do-not-send="true" href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
Qgis-developer mailing list
<a moz-do-not-send="true" href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Qgis-developer mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
              target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>