ag_window_save_action() now only saves if needed
This commit is contained in:
parent
d2d67534b3
commit
f1fba37d0d
@ -250,11 +250,10 @@ ag_window_save_action(GSimpleAction *action,
|
||||
|
||||
recalculate_chart(window);
|
||||
|
||||
old_id = (priv->saved_data) ? priv->saved_data->db_id : -1;
|
||||
if (!ag_window_can_close(window, FALSE)) {
|
||||
old_id = (priv->saved_data) ? priv->saved_data->db_id : -1;
|
||||
save_data = ag_chart_get_db_save(priv->chart, old_id);
|
||||
|
||||
save_data = ag_chart_get_db_save(priv->chart, old_id);
|
||||
|
||||
if (!ag_db_save_identical(priv->saved_data, save_data)) {
|
||||
if (!ag_db_save_chart(db, save_data, &err)) {
|
||||
ag_app_message_dialog(
|
||||
GTK_WIDGET(window),
|
||||
@ -266,8 +265,6 @@ ag_window_save_action(GSimpleAction *action,
|
||||
|
||||
ag_db_save_data_free(priv->saved_data);
|
||||
priv->saved_data = save_data;
|
||||
} else {
|
||||
ag_db_save_data_free(save_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user