Skip to content

Commit

Permalink
[desktop]: Allow set maxStars on Settings for Siril
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagohm committed Jun 13, 2024
1 parent 6682e5c commit e6658bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion desktop/src/app/image/image.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ export class ImageComponent implements AfterViewInit, OnDestroy {
this.solver.pixelSize = preference.solver?.pixelSize ?? 0
this.starDetection.type = preference.starDetection?.type ?? this.starDetection.type
this.starDetection.minSNR = preference.starDetection?.minSNR ?? this.preference.starDetectionRequest(this.starDetection.type).get().minSNR ?? this.starDetection.minSNR
this.starDetection.maxStars = preference.starDetection?.maxStars ?? this.starDetection.maxStars
this.starDetection.maxStars = preference.starDetection?.maxStars ?? this.preference.starDetectionRequest(this.starDetection.type).get().maxStars ?? this.starDetection.maxStars

this.fov.fovs = this.preference.imageFOVs.get()
this.fov.fovs.forEach(e => { e.enabled = false; e.computed = undefined })
Expand Down
11 changes: 10 additions & 1 deletion desktop/src/app/settings/settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
[path]="starDetectors.get(starDetectorType)!.executablePath" class="w-full"
(pathChange)="starDetectors.get(starDetectorType)!.executablePath = $event; save()" />
</div>
<div class="col-4">
<div class="col-4" *ngIf="starDetectorType !== 'SIRIL'">
<span class="p-float-label">
<p-inputNumber [min]="0" [max]="500" [step]="1" [showButtons]="true" class="w-full" styleClass="p-inputtext-sm border-0 w-full"
[ngModel]="starDetectors.get(starDetectorType)!.minSNR"
Expand All @@ -97,6 +97,15 @@
<label>Min SNR</label>
</span>
</div>
<div class="col-4" *ngIf="starDetectorType === 'SIRIL'">
<span class="p-float-label">
<p-inputNumber [min]="0" [max]="2000" [step]="1" [showButtons]="true" class="w-full" styleClass="p-inputtext-sm border-0 w-full"
[ngModel]="starDetectors.get(starDetectorType)!.maxStars"
(ngModelChange)="starDetectors.get(starDetectorType)!.maxStars = $event; save()" locale="en" [allowEmpty]="false"
scrollableNumber />
<label>Max stars</label>
</span>
</div>
<div class="col-4">
<span class="p-float-label">
<p-inputNumber styleClass="p-inputtext-sm border-0 w-full" [ngModel]="starDetectors.get(starDetectorType)!.timeout"
Expand Down

0 comments on commit e6658bf

Please sign in to comment.