Goes to Primary and yes you will lose the Weapon in that Slot. However, you can save that Weapon by first moving it into your Backpack...but to do that reliably you need to make sure you have 10 available slots or else the Weapon will simply disappear. I'm not sure if that is even enough though.
The only way I have found to be reliable is to open a Loot Pile, drop the Weapon to the pile, then open your Backpack and put the Weapon into it from the Loot Pile...being sure not to close the Inventory at any time.