bar number not consecutive

Have a problem with bar numbers. Score with solo instrument and piano goes consecutively from bars #1-149, then the next bar is #139 and continues consecutively after that to the end of about 200 bars. (The piece has many meter changes, but that shouldn’t affect this?)

I imported an XML file to Dorico. Worked on it for a while, added and deleted groups of bars, then noticed the problem. So I don’t know if this happened with the XML import or after I worked on it. It is correct in the original from which I created the XML.

At the problem place, I can change the bar #139 to #151, but that is only for the one bar. Rather than doing it manually, how do I get the rest of the bars to change so it is all correct?

I tried creating a bar number change in one of my scores, and was looking for a sign post, but didn’t find it. However, I found that if I selected the new bar number with the change, and deleted it, everything after that spot reverted to normal consecutive numbers. Might be worth trying.

Rebecca, it’s very likely because it’s an XML import. I suspect you have some hidden time signatures that are messing everything up. You may have to start at the end of the piece and work backwards, systematically deleting and re-entering each time signature change. I have to do this from time to time when I import an XML and the bar numbers are messed up.

You may actually be able to delete and reenter the very first time signature in the piece. Sometimes that’s all it takes!

Deleting the incorrect bar number fixed it, had to do it in a few places. And yes, the problems occurred at time signature changes.
So appreciate both of you for helping, Many thanks!