mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-19 09:17:54 +01:00
Toolbars accessed by static Get() functions, not through AudacityProject
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "DeviceToolBar.h"
|
||||
#include "ToolManager.h"
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include <wx/wxprec.h>
|
||||
@@ -80,6 +81,17 @@ DeviceToolBar::~DeviceToolBar()
|
||||
{
|
||||
}
|
||||
|
||||
DeviceToolBar &DeviceToolBar::Get( AudacityProject &project )
|
||||
{
|
||||
auto &toolManager = ToolManager::Get( project );
|
||||
return *static_cast<DeviceToolBar*>( toolManager.GetToolBar(DeviceBarID) );
|
||||
}
|
||||
|
||||
const DeviceToolBar &DeviceToolBar::Get( const AudacityProject &project )
|
||||
{
|
||||
return Get( const_cast<AudacityProject&>( project )) ;
|
||||
}
|
||||
|
||||
void DeviceToolBar::Create(wxWindow *parent)
|
||||
{
|
||||
ToolBar::Create(parent);
|
||||
|
||||
Reference in New Issue
Block a user