fix caching crash
fix caching crash

Change the logic to first paint the new pixmap, and
then insert it into the cache, as inserting into the
cache can delete the pixmap, and then it crashes.

utkuaydin/marble,adraghici/marble,utkuaydin/marble,Earthwings/marble,AndreiDuma/marble,utkuaydin/marble,Earthwings/marble,Earthwings/marble,utkuaydin/marble,David-Gil/marble-dev,AndreiDuma/marble,adraghici/marble,tucnak/marble,oberluz/marble,rku/marble,oberluz/marble,utkuaydin/marble,probonopd/marble,probonopd/marble,tzapzoor/marble,Earthwings/marble,David-Gil/marble-dev,quannt24/marble,AndreiDuma/marble,oberluz/marble,tucnak/marble,adraghici/marble,tzapzoor/marble,tucnak/marble,quannt24/marble,AndreiDuma/marble,tucnak/marble,probonopd/marble,quannt24/marble,rku/marble,quannt24/marble,quannt24/marble,probonopd/marble,utkuaydin/marble,oberluz/marble,tucnak/marble,rku/marble,David-Gil/marble-dev,David-Gil/marble-dev,tzapzoor/marble,rku/marble,tzapzoor/marble,tzapzoor/marble,probonopd/marble,tucnak/marble,AndreiDuma/marble,probonopd/marble,adraghici/marble,Earthwings/marble,David-Gil/marble-dev,oberluz/marble,tzapzoor/marble,adraghici/marble,quannt24/marble,probonopd/marble,Earthwings/marble,AndreiDuma/marble,tucnak/marble,tzapzoor/marble,oberluz/marble,rku/marble,quannt24/marble,adraghici/marble,tzapzoor/marble,David-Gil/marble-dev,rku/marble