]> git.tdb.fi Git - ext/subsurface.git/blobdiff - parse-xml.c
Use the correct signal to avoid Gtk-CRITICAL error message
[ext/subsurface.git] / parse-xml.c
index e6472735dcdd40ca91bf69daebcb035ac7ed9be7..6eafb0d3aaf993bf8efc78b5d6916387ac0f3c0a 100644 (file)
@@ -1083,7 +1083,7 @@ static void match_standard_cylinder(cylinder_type_t *type)
                return;
 
        cuft = type->size.mliter / 28317.0;
-       cuft *= type->workingpressure.mbar / 1013.25;
+       cuft *= to_ATM(type->workingpressure);
        psi = type->workingpressure.mbar / 68.95;
 
        switch (psi) {
@@ -1138,7 +1138,7 @@ static void sanitize_cylinder_type(cylinder_type_t *type)
 
        if (input_units.volume == CUFT || import_source == SUUNTO) {
                volume_of_air = type->size.mliter * 28.317;     /* milli-cu ft to milliliter */
-               atm = type->workingpressure.mbar / 1013.25;     /* working pressure in atm */
+               atm = to_ATM(type->workingpressure);            /* working pressure in atm */
                volume = volume_of_air / atm;                   /* milliliters at 1 atm: "true size" */
                type->size.mliter = volume + 0.5;
        }
@@ -1175,7 +1175,7 @@ static void event_start(void)
 
 static void event_end(void)
 {
-       if (event.name)
+       if (event.name && strcmp(event.name, "surface") != 0)
                add_event(dive, event.time.seconds, event.type, event.flags, event.value, event.name);
        event.active = 0;
 }