Completely disable the query when the print is active.

fix #757