Make apply button on the line type dialog work correctly