fixed a bug with the qpainter painting while the texture gets changed as well as a dithering issue
rolled out my previous fix for dithered color in indexed8 images and did it correctly with the correct dither flags