Split out layer settings dialog code