Add flag in order to specify if the query is done with graphical query editor
or by hands