09-28-2021, 08:27 AM
The selection mask (what everyone abusively calls the "selection") applies to the whole image, not to a specific layer. But it can be created/altred using data from one or more layers. In your case:
- Select (as in "making current") the port layer, and create a selection from it (say, fuzzy select)
- Select the ground layer, set the fuzzy select tool to Subtract mode (top row of red icons at the top of the tool options) and make a selection on it. This selection will be subtracted from the selection obtained in the previous step.