Possible bug with tilemap

I was going between two games because I was trying to replicate something in the tilemap from one game to another. Then when I loaded the game I was copying everything to, this happened.

The tiles you see on this picture wasn’t from that game. It was from the other one that I was copying from. When i closed the drawing window and reopened it, everything was back to normal. Then it looked like this:

I did not lose anything when this happened. I just got really confused. While the bugg occured, I could not draw anything or change anything. You could also see a few of the same tiles in the game that i was working on. On the picture where something went wrong.