Fix paint of wxClientDC in wxQT

Moved the painter replay inside the paint event, so the erase and paint wx event are processed (wxPaintDC) before actions drawn outside the event handler (wxClientDC).
After this, background was not prepared correctly and the drawing could become inconsistent (specially if the wxClientDC was just used for measures, ie: no drawings)
Avoid painting recursion for wxClientDC in wxQT

Firing a repaint inside a paint ever could be recursive, update() should be used in that case but it is not immediate.
Also, note that now the wxClientDC would work even if it is used inside the paint event, and could be used to simplificate the logic.