diff --git a/src/toolbars/ToolsToolBar.cpp b/src/toolbars/ToolsToolBar.cpp index 2ceb722bd..3b4f5b2f6 100644 --- a/src/toolbars/ToolsToolBar.cpp +++ b/src/toolbars/ToolsToolBar.cpp @@ -270,7 +270,7 @@ int ToolsToolBar::GetDownTool() return firstTool; // Should never happen } -const wxChar * ToolsToolBar::GetMessageForTool( int ToolNumber ) const +wxString ToolsToolBar::GetMessageForTool( int ToolNumber ) const { wxASSERT( ToolNumber >= 0 ); wxASSERT( ToolNumber < numTools ); diff --git a/src/toolbars/ToolsToolBar.h b/src/toolbars/ToolsToolBar.h index bdfdbabe2..5f83cf9d7 100644 --- a/src/toolbars/ToolsToolBar.h +++ b/src/toolbars/ToolsToolBar.h @@ -62,7 +62,7 @@ class ToolsToolBar final : public ToolBar { bool IsDown(int tool) const; int GetDownTool(); - const wxChar * GetMessageForTool( int ToolNumber ) const; + wxString GetMessageForTool( int ToolNumber ) const; void Populate(); void Repaint(wxDC * WXUNUSED(dc)) override {}; diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index a40a86beb..c1e19dfd3 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -959,9 +959,9 @@ const wxString &Scrubber::GetUntranslatedStateString() const return empty; } -const wxString & Scrubber::StatusMessageForWave() const +wxString Scrubber::StatusMessageForWave() const { - static wxString result; + wxString result; result = ""; if( Seeks() ) diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index 7b9f08944..66538f5f7 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -130,7 +130,7 @@ public: // A string to put in the leftmost part of the status bar // when scrub or seek is in progress, or else empty. const wxString &GetUntranslatedStateString() const; - const wxString &StatusMessageForWave() const; + wxString StatusMessageForWave() const; // All possible status strings. static std::vector GetAllUntranslatedStatusStrings();