1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Allow selected tool to persist across toolbar reset

This commit is contained in:
lllucius 2015-01-01 20:05:06 +00:00
parent 622b609f91
commit 6459324b4c
2 changed files with 7 additions and 13 deletions

View File

@ -92,17 +92,6 @@ ToolsToolBar::ToolsToolBar()
#endif
mMessageOfTool[drawTool] = _("Click and drag to move a track in time");
mMessageOfTool[multiTool] = wxT(""); // multi-mode tool
}
ToolsToolBar::~ToolsToolBar()
{
for (int i = 0; i < 5; i++)
delete mTool[i];
}
void ToolsToolBar::Create(wxWindow * parent)
{
ToolBar::Create(parent);
bool multiToolActive = false;
gPrefs->Read(wxT("/GUI/ToolBars/Tools/MultiToolActive"), &multiToolActive);
@ -111,8 +100,12 @@ void ToolsToolBar::Create(wxWindow * parent)
mCurrentTool = multiTool;
else
mCurrentTool = selectTool;
}
mTool[mCurrentTool]->PushDown();
ToolsToolBar::~ToolsToolBar()
{
for (int i = 0; i < 5; i++)
delete mTool[i];
}
void ToolsToolBar::RegenerateToolsTooltips()
@ -186,6 +179,8 @@ void ToolsToolBar::Populate()
mTool[ slideTool ] = MakeTool( bmpTimeShift, slideTool, _("Slide Tool") );
mTool[ multiTool ] = MakeTool( bmpMulti, multiTool, _("Multi Tool") );
mTool[mCurrentTool]->PushDown();
RegenerateToolsTooltips();
}

View File

@ -51,7 +51,6 @@ class ToolsToolBar:public ToolBar {
ToolsToolBar();
virtual ~ToolsToolBar();
void Create(wxWindow *parent);
void UpdatePrefs();
void OnTool(wxCommandEvent & evt);