Pressure-induced magnetic transitions with change of the orbital configuration in dimerised systems