Skip to main content

add_label

Function add_label 

Source
fn add_label<C: Canvas>(
    data: &mut Drawing<'_>,
    route_id: RouteId,
    pos: Pos2,
    painter: &Style<'_, C>,
) -> Transition
Expand description

Add a name label to route_id at pos and re-route. If the route had no label before, open its text editor so the user can name it straight away; otherwise (a subsequent label on an already-named route, which opens no editor) return to the select tool rather than staying in add-label mode.