diff --git a/src/app/components/pb-schema/pb-schema.component.ts b/src/app/components/pb-schema/pb-schema.component.ts index 7ac6b72a7bc7a7ac2c2d6414e1bd11deccce26f7..6de70eecd8ddf7c49d2c45a200a9ae6a6cf0a009 100644 --- a/src/app/components/pb-schema/pb-schema.component.ts +++ b/src/app/components/pb-schema/pb-schema.component.ts @@ -435,6 +435,13 @@ export class PbSchemaComponent implements AfterViewInit, AfterContentInit, OnIni } public get enableRemoveButton() { + // do not allow to remove last basin + if (this._selectedItem instanceof PbBassin) { + if (this.predamService.bassins.length == 1) { + return false; + } + } + if (this._selectedItem === this.predamService.upstreamBassin) { return false; }