reset painter in setPainter method