Redraw panel when active camera changes

I am coding a little panel in Render panel that shows some properties of the current active camera.

When I change the active camera with ctrl-0, the panel is not redrawn until the mouse enters it, then the attributes are updated to the new active camera.

Is there a way to trigger a redraw of a panel when the active camera is changed with ctr-0?

Thanks!

you could force a redraw, but it seems to be a flaw of Ctrl-0 operator in the first place and should get fixed there. I suggest you submit a bug report

http://projects.blender.org/tracker/?func=add&group_id=9&atid=498

Thank you, will try to report it.

Ok, I open a bug report http://projects.blender.org/tracker/index.php?func=detail&aid=34237&group_id=9&atid=498

The closing answer is:
Adding variables in a new panel don’t automatically register themselves for updates. That happens per-panel via “notifiers”.

Anyone knows how to add a notifier with python so that the panel (with bl_context=‘render’) gets updated when the active camera changes?

you can’t add notifiers with python, nor receive notifications :frowning: