Only enable UI for manual optimization when appropriate

Authored by johanneszarl on Oct 30 2019, 10:55 PM.