mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-22 07:10:06 +02:00
Move selection state into AudacityProject, out of TrackPanel
This commit is contained in:
parent
4da881d1db
commit
a9f7cb26e7
@ -24,6 +24,7 @@
|
||||
#include "widgets/OverlayPanel.h"
|
||||
|
||||
#include "DirManager.h"
|
||||
#include "SelectionState.h"
|
||||
#include "ViewInfo.h"
|
||||
#include "TrackPanelListener.h"
|
||||
#include "AudioIOListener.h"
|
||||
@ -281,6 +282,7 @@ public:
|
||||
wxPanel *GetTopPanel() { return mTopPanel; }
|
||||
TrackPanel * GetTrackPanel() {return mTrackPanel;}
|
||||
const TrackPanel * GetTrackPanel() const {return mTrackPanel;}
|
||||
SelectionState &GetSelectionState() { return mSelectionState; }
|
||||
|
||||
bool GetIsEmpty();
|
||||
|
||||
@ -635,6 +637,7 @@ private:
|
||||
AdornedRulerPanel *mRuler{};
|
||||
wxPanel *mTopPanel{};
|
||||
TrackPanel *mTrackPanel{};
|
||||
SelectionState mSelectionState{};
|
||||
std::unique_ptr<TrackFactory> mTrackFactory{};
|
||||
wxPanel * mMainPanel;
|
||||
wxScrollBar *mHsbar;
|
||||
|
@ -571,6 +571,11 @@ TrackPanel::~TrackPanel()
|
||||
DeleteMenus();
|
||||
}
|
||||
|
||||
SelectionState &TrackPanel::GetSelectionState()
|
||||
{
|
||||
return GetProject()->GetSelectionState();
|
||||
}
|
||||
|
||||
void TrackPanel::BuildMenusIfNeeded(void)
|
||||
{
|
||||
if (!mRateMenu)
|
||||
|
@ -639,8 +639,7 @@ protected:
|
||||
bool mRefreshBacking;
|
||||
|
||||
SelectedRegion mInitialSelection;
|
||||
SelectionState mSelectionState{};
|
||||
SelectionState &GetSelectionState() { return mSelectionState; }
|
||||
SelectionState &GetSelectionState();
|
||||
std::unique_ptr<SelectionStateChanger> mSelectionStateChanger{};
|
||||
|
||||
bool mSelStartValid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user