I think that accidentally I pressed some key, and now all I can draw is straight lines in this way.
I'm using a digital tablet, the other texture in this same scene paints correctly.
I don't know what function I pressed, help.
Maybe you accidentaly changed the paint stroke method to Line. Press E in the UV Editor window and change it to Space or do it in the Paint Stroke panel.
For other useful shortcuts please see this answer: Can I paint a texture within the UV viewport?