Fix total geometry calculation in when compiled with Qt4.