Avoid to create a new SelectPatternPanel when unnecessary

Closes #1284