1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-22 16:41:18 +01:00

Move AudacityProject::RemoveTrack

This commit is contained in:
Paul Licameli
2018-10-27 20:16:39 -04:00
parent 83f504e30f
commit 51c3541716
5 changed files with 43 additions and 41 deletions

View File

@@ -12,6 +12,7 @@ Paul Licameli split from TrackPanel.cpp
#include "TrackButtonHandles.h"
#include "../../HitTestResult.h"
#include "../../Menus.h"
#include "../../Project.h"
#include "../../RefreshCode.h"
#include "../../Track.h"
@@ -95,7 +96,7 @@ UIHandle::Result CloseButtonHandle::CommitChanges
pProject->StopIfPaused();
if (!pProject->IsAudioActive()) {
// This pushes an undo item:
pProject->RemoveTrack(pTrack.get());
TrackActions::DoRemoveTrack(*pProject, pTrack.get());
// Redraw all tracks when any one of them closes
// (Could we invent a return code that draws only those at or below
// the affected track?)