diff --git a/src/Menus.cpp b/src/Menus.cpp index b8f8cecaf..48928ab0d 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -2258,7 +2258,7 @@ void AudacityProject::SetTool(int tool) { ToolsToolBar *toolbar = GetToolsToolBar(); if (toolbar) { - toolbar->SetCurrentTool(tool, true); + toolbar->SetCurrentTool(tool); mTrackPanel->Refresh(false); } } @@ -2300,7 +2300,7 @@ void AudacityProject::OnNextTool() if (toolbar) { // Use GetDownTool() here since GetCurrentTool() can return a value that // doesn't represent the real tool if the Multi-tool is being used. - toolbar->SetCurrentTool((toolbar->GetDownTool()+1)%numTools, true); + toolbar->SetCurrentTool((toolbar->GetDownTool()+1)%numTools); mTrackPanel->Refresh(false); } } @@ -2311,7 +2311,7 @@ void AudacityProject::OnPrevTool() if (toolbar) { // Use GetDownTool() here since GetCurrentTool() can return a value that // doesn't represent the real tool if the Multi-tool is being used. - toolbar->SetCurrentTool((toolbar->GetDownTool()+(numTools-1))%numTools, true); + toolbar->SetCurrentTool((toolbar->GetDownTool()+(numTools-1))%numTools); mTrackPanel->Refresh(false); } } diff --git a/src/toolbars/ToolsToolBar.cpp b/src/toolbars/ToolsToolBar.cpp index db1ae6ca9..2ceb722bd 100644 --- a/src/toolbars/ToolsToolBar.cpp +++ b/src/toolbars/ToolsToolBar.cpp @@ -225,24 +225,21 @@ int ToolsToolBar::GetCurrentTool() const /// Sets the currently active tool /// @param tool - The index of the tool to be used. -/// @param show - should we update the button display? -void ToolsToolBar::SetCurrentTool(int tool, bool show) +void ToolsToolBar::SetCurrentTool(int tool) { //In multi-mode the current tool is shown by the //cursor icon. The buttons are not updated. bool leavingMulticlipMode = - IsDown(multiTool) && show && tool != multiTool; + IsDown(multiTool) && tool != multiTool; if (leavingMulticlipMode) mTool[multiTool]->PopUp(); if (tool != mCurrentTool || leavingMulticlipMode) { - if (show) - mTool[mCurrentTool]->PopUp(); + mTool[mCurrentTool]->PopUp(); mCurrentTool=tool; - if (show) - mTool[mCurrentTool]->PushDown(); + mTool[mCurrentTool]->PushDown(); } //JKC: ANSWER-ME: Why is this RedrawAllProjects() line required? //msmeyer: I think it isn't, we leave it out for 1.3.1 (beta), and @@ -250,14 +247,11 @@ void ToolsToolBar::SetCurrentTool(int tool, bool show) // RedrawAllProjects(); //msmeyer: But we instruct the projects to handle the cursor shape again - if (show) - { - RefreshCursorForAllProjects(); + RefreshCursorForAllProjects(); - gPrefs->Write(wxT("/GUI/ToolBars/Tools/MultiToolActive"), - IsDown(multiTool)); - gPrefs->Flush(); - } + gPrefs->Write(wxT("/GUI/ToolBars/Tools/MultiToolActive"), + IsDown(multiTool)); + gPrefs->Flush(); } bool ToolsToolBar::IsDown(int tool) const diff --git a/src/toolbars/ToolsToolBar.h b/src/toolbars/ToolsToolBar.h index addf1551d..bdfdbabe2 100644 --- a/src/toolbars/ToolsToolBar.h +++ b/src/toolbars/ToolsToolBar.h @@ -55,7 +55,7 @@ class ToolsToolBar final : public ToolBar { void OnTool(wxCommandEvent & evt); - void SetCurrentTool(int tool, bool show); + void SetCurrentTool(int tool); //These interrogate the state of the buttons or controls. int GetCurrentTool() const;