Neue Abwensenheitsmodi plus Upgrade Sitzplan
This commit is contained in:
@@ -48,7 +48,7 @@ public partial class SeatingPlanTabView : UserControl
|
||||
!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed) return;
|
||||
var candidate = control.DataContext;
|
||||
if (candidate is SeatCellViewModel { IsOccupied: false } or null) return;
|
||||
if (DataContext is not SeatingPlanTabViewModel { IsEditable: true }) return;
|
||||
if (DataContext is not SeatingPlanTabViewModel { CanEditLayout: true }) return;
|
||||
_dragCandidate = candidate;
|
||||
_dragTrigger = e;
|
||||
_pressPosition = e.GetPosition(this);
|
||||
@@ -132,7 +132,7 @@ public partial class SeatingPlanTabView : UserControl
|
||||
}
|
||||
|
||||
private bool CanDropOn(SeatCellViewModel target) =>
|
||||
DataContext is SeatingPlanTabViewModel { IsEditable: true }
|
||||
DataContext is SeatingPlanTabViewModel { CanEditLayout: true }
|
||||
&& ((_draggedSeat is not null && _draggedSeat != target) || _draggedStudent?.StudentId is not null);
|
||||
|
||||
private void OnUnassignedDragOver(object? sender, DragEventArgs e) =>
|
||||
|
||||
Reference in New Issue
Block a user