Solar flares are sudden and violent releases of magnetic energy in the solar atmosphere that can be divided in eruptive flares, when plasma is ejected from the solar atmosphere, resulting in a coronal mass ejection (CME), and confined flares when no CME is associated with the flare. We present a case-study showing the evolution of key topological structures, such as spines and fans which may determine the eruptive versus non-eruptive behavior of the series of eruptive flares, followed by confined flares, which are all originating from the same site. To study the connectivity of the different flux domains and their evolution, we compute a potential magnetic field model of the active region. Quasi-separatrix layers are retrieved from the magnetic field extrapolation. The change of behavior of the flares from one day to the next -eruptive to confined- can be attributed to the change of orientation of the magnetic field below the fan with respect to the orientation of the overlaying spine, rather than an overall change in the stability of the large scale field. Flares tend to be more-and-more confined when the field that supports the filament and the overlying field gradually become less-and-less anti-parallel, as a direct result of changes in the photospheric flux distribution, being themselves driven by continuous shearing motions of the different magnetic flux concentrations.