Update edit event show only published locations

When editing Events there were listed all events in the selection list, even deleted and unpublished ones. Fixed this with SQL Query WHERE Statement. 
$query->where('a.state = 1');   //states: 0 = unpublished, 1 = published, -2 = deleted