mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[release] remove useless empty conf strings and prevent addgin them to non-released airframes. Solves #2177 (#2178)
This commit is contained in:
committed by
Gautier Hattenberger
parent
d3110685cd
commit
62bb3cafaa
@@ -170,9 +170,7 @@ let save_callback = fun ?user_save gui ac_combo tree tree_modules () ->
|
||||
GToolbox.message_box ~title:"Error on A/C id" "A/C id must be a non null number less than 255"
|
||||
else
|
||||
let color = !current_color in
|
||||
let aircraft =
|
||||
Xml.Element ("aircraft",
|
||||
[ "name", ac_name;
|
||||
let attribs = ["name", ac_name;
|
||||
"ac_id", ac_id;
|
||||
"airframe", gui#label_airframe#text;
|
||||
"radio", gui#label_radio#text;
|
||||
@@ -180,9 +178,9 @@ let save_callback = fun ?user_save gui ac_combo tree tree_modules () ->
|
||||
"flight_plan", gui#label_flight_plan#text;
|
||||
"settings", Gtk_tools.tree_values ~only_checked:false tree;
|
||||
"settings_modules", Gtk_tools.tree_values ~only_checked:false tree_modules;
|
||||
"gui_color", color;
|
||||
"release", gui#label_release#text ],
|
||||
[]) in
|
||||
"gui_color", color ] in
|
||||
let attribs = if gui#label_release#text = "" then attribs else attribs @ ["release", gui#label_release#text ] in
|
||||
let aircraft = Xml.Element ("aircraft", attribs, []) in
|
||||
begin try Hashtbl.remove Utils.aircrafts ac_name with _ -> () end;
|
||||
Hashtbl.add Utils.aircrafts ac_name aircraft
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user