diff --git a/inc/audio/automation_point.h b/inc/audio/automation_point.h index 282d7e956..722a90d69 100644 --- a/inc/audio/automation_point.h +++ b/inc/audio/automation_point.h @@ -1,21 +1,5 @@ -/* - * Copyright (C) 2018-2022 Alexandros Theodotou - * - * This file is part of Zrythm - * - * Zrythm is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Zrythm is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with Zrythm. If not, see . - */ +// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou +// SPDX-License-Identifier: LicenseRef-ZrythmLicense /** * \file diff --git a/inc/utils/stack.h b/inc/utils/stack.h index e2976fc71..004269c55 100644 --- a/inc/utils/stack.h +++ b/inc/utils/stack.h @@ -1,21 +1,5 @@ -/* - * Copyright (C) 2019-2021 Alexandros Theodotou - * - * This file is part of Zrythm - * - * Zrythm is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Zrythm is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with Zrythm. If not, see . - */ +// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou +// SPDX-License-Identifier: LicenseRef-ZrythmLicense /** * \file diff --git a/src/actions/actions.c b/src/actions/actions.c index 7a10bc5e4..5a441895b 100644 --- a/src/actions/actions.c +++ b/src/actions/actions.c @@ -1860,8 +1860,20 @@ activate_delete_selected_tracks ( return; } - on_delete_tracks_response ( - NULL, GTK_RESPONSE_YES, NULL); + GError * err = NULL; + bool ret = + tracklist_selections_action_perform_delete ( + TRACKLIST_SELECTIONS, PORT_CONNECTIONS_MGR, + &err); + if (ret) + { + EVENTS_PUSH (ET_UNDO_REDO_ACTION_DONE, NULL); + } + else + { + HANDLE_ERROR ( + err, "%s", _ ("Failed to delete tracks")); + } } DEFINE_SIMPLE (activate_hide_selected_tracks) diff --git a/src/gui/widgets/automation_point.c b/src/gui/widgets/automation_point.c index c89077163..574aba7fb 100644 --- a/src/gui/widgets/automation_point.c +++ b/src/gui/widgets/automation_point.c @@ -133,7 +133,6 @@ automation_point_draw ( int upslope = next_ap && ap->fvalue < next_ap->fvalue; - (void) upslope; (void) next_obj; if (next_ap) diff --git a/tests/actions/tracklist_selections.c b/tests/actions/tracklist_selections.c index 8549357ce..160a0f82e 100644 --- a/tests/actions/tracklist_selections.c +++ b/tests/actions/tracklist_selections.c @@ -1039,6 +1039,10 @@ test_no_visible_tracks_after_track_deletion (void) g_assert_cmpint ( TRACKLIST_SELECTIONS->num_tracks, >, 0); + /* assert undo history is not empty */ + g_assert_false (undo_stack_is_empty ( + UNDO_MANAGER->undo_stack)); + test_helper_zrythm_cleanup (); } @@ -3189,15 +3193,15 @@ main (int argc, char * argv[]) #define TEST_PREFIX \ "/actions/tracklist_selections/" - g_test_add_func ( - TEST_PREFIX - "test track deletion with lv2 worker", - (GTestFunc) test_track_deletion_with_lv2_worker); g_test_add_func ( TEST_PREFIX "test no visible tracks after track deletion", (GTestFunc) test_no_visible_tracks_after_track_deletion); + g_test_add_func ( + TEST_PREFIX + "test track deletion with lv2 worker", + (GTestFunc) test_track_deletion_with_lv2_worker); g_test_add_func ( TEST_PREFIX "test track deletion w mixer selections",