How To Play Animation Only When In Certain State

Hi,

I would to play animation “Marching1” only after the character in “Idle_MarchingMode”

As you can see in attached images, I created “Idle/Run” State and “Idle_MarchingMode” State.
The character get into “Idle_MarchingMode” stance by pressing key “1”, and press “1” again to get to “Idle/Run”

To play animation “Marching1” - Press “Q” key

But for now, I can press Q and play animation “Marching1” in both Idle/Run state and “Idle_MarchingMode” State.
How to make it only playable by press “Q” only after I press “1” (Idle_MarchingMode)?