Hi
Pains in your leg and feet (is it around the sock/stocking area?) can often be signs of neuropathy which as you know is a complication of diabetes. Peripheral neuropathy being most likely
I dont know if this would be related to weight loss per se, unless that weight loss has reduced some of your insulin resistance and your bg is now looking better or your control is tighter as a result.
As well as being a complication generally (which, btw can be reversed in part with tighter control) if you are running better bg then sometimes as your control tightens and the damage starts to reverse then you can get pain as the nerves heal.
Only you will know what camp your are in at present!
However, dont ignore it, go to Doc as you can get meds to help if if is the beginning of complications., However dont assume that meds will solve it all, thats just symptom management, and it would be better to find ways to reverse it if it is emerging neuropathy!
Also, could be something else but as a T2 for ten years (and most are T2 for years before diagnosis) then it seems most likely
HOpe this helps