Remove unnecessary gswe_planet_data_unref() calls
This introduced an ugly bug when changing from the Edit tab to Chart view for the second time.
This commit is contained in:
parent
3105ae2998
commit
306584ff70
@ -748,12 +748,10 @@ ag_chart_create_svg(AgChart *chart, GError **err)
|
||||
planet_data = gswe_aspect_data_get_planet1(aspect_data);
|
||||
enum_value = g_enum_get_value(G_ENUM_CLASS(planets_class), gswe_planet_data_get_planet(planet_data));
|
||||
xmlNewProp(node, BAD_CAST "body1", BAD_CAST enum_value->value_name);
|
||||
gswe_planet_data_unref(planet_data);
|
||||
|
||||
planet_data = gswe_aspect_data_get_planet2(aspect_data);
|
||||
enum_value = g_enum_get_value(G_ENUM_CLASS(planets_class), gswe_planet_data_get_planet(planet_data));
|
||||
xmlNewProp(node, BAD_CAST "body2", BAD_CAST enum_value->value_name);
|
||||
gswe_planet_data_unref(planet_data);
|
||||
|
||||
enum_value = g_enum_get_value(G_ENUM_CLASS(aspects_class), gswe_aspect_data_get_aspect(aspect_data));
|
||||
xmlNewProp(node, BAD_CAST "type", BAD_CAST enum_value->value_name);
|
||||
@ -780,12 +778,10 @@ ag_chart_create_svg(AgChart *chart, GError **err)
|
||||
planet_data = gswe_antiscion_data_get_planet1(antiscion_data);
|
||||
enum_value = g_enum_get_value(G_ENUM_CLASS(planets_class), gswe_planet_data_get_planet(planet_data));
|
||||
xmlNewProp(node, BAD_CAST "body1", BAD_CAST enum_value->value_name);
|
||||
gswe_planet_data_unref(planet_data);
|
||||
|
||||
planet_data = gswe_antiscion_data_get_planet2(antiscion_data);
|
||||
enum_value = g_enum_get_value(G_ENUM_CLASS(planets_class), gswe_planet_data_get_planet(planet_data));
|
||||
xmlNewProp(node, BAD_CAST "body2", BAD_CAST enum_value->value_name);
|
||||
gswe_planet_data_unref(planet_data);
|
||||
|
||||
enum_value = g_enum_get_value(G_ENUM_CLASS(antiscia_class), gswe_antiscion_data_get_axis(antiscion_data));
|
||||
xmlNewProp(node, BAD_CAST "axis", BAD_CAST enum_value->value_name);
|
||||
|
Loading…
Reference in New Issue
Block a user