Skip to content

Commit

Permalink
[gcs] add shapes to the background layer to keep WP and A/C on top (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger authored and OpenUAS committed Jun 20, 2018
1 parent 4320d7f commit b8cdc09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sw/ground_segment/cockpit/shapes.ml
Expand Up @@ -73,7 +73,7 @@ let text_exist = fun id ->

let update_circle = fun id wgs84 opacity fill_color color radius (geomap:MapCanvas.widget) ->
try
let gencircle = geomap#circle ~width:2 ~fill_color ~opacity ~color wgs84.(0) radius in
let gencircle = geomap#circle ~group:geomap#background ~width:2 ~fill_color ~opacity ~color wgs84.(0) radius in
if (circle_exist id) then
let shape = Hashtbl.find circleshapes id in
shape#destroy ();
Expand All @@ -84,7 +84,7 @@ let update_circle = fun id wgs84 opacity fill_color color radius (geomap:MapCanv

let update_polygon = fun id positionarr opacity fill_color color (geomap:MapCanvas.widget) ->
try
let genpolygon = geomap#polygon ~width:2 ~fill_color ~opacity ~color positionarr in
let genpolygon = geomap#polygon ~group:geomap#background ~width:2 ~fill_color ~opacity ~color positionarr in
if (polygon_exist id) then
let shape = Hashtbl.find polygonshapes id in
shape#destroy ();
Expand All @@ -95,7 +95,7 @@ let update_polygon = fun id positionarr opacity fill_color color (geomap:MapCanv

let update_line = fun id positionarr color (geomap:MapCanvas.widget) ->
try
let genline = geomap#segment ~width:2 ~fill_color:color positionarr.(0) positionarr.(1) in
let genline = geomap#segment ~group:geomap#background ~width:2 ~fill_color:color positionarr.(0) positionarr.(1) in
if (line_exist id) then
let shape = Hashtbl.find lineshapes id in
shape#destroy ();
Expand All @@ -106,7 +106,7 @@ let update_line = fun id positionarr color (geomap:MapCanvas.widget) ->

let update_text = fun id positionarr color text (geomap:MapCanvas.widget)->
try
let gentext = geomap#text ~fill_color:color positionarr.(0) text in
let gentext = geomap#text ~group:geomap#background ~fill_color:color positionarr.(0) text in
if (text_exist id) then
let shape = Hashtbl.find textshapes id in
shape#destroy ();
Expand Down

0 comments on commit b8cdc09

Please sign in to comment.