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