⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/webui/src/client/styles/rundownView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ svg.icon {
bottom: 0;
right: 1px;
z-index: 10;
pointer-events: all;
pointer-events: none;
background-image: repeating-linear-gradient(
45deg,
var(--invalid-reason-color-transparent) 0%,
Expand Down
1 change: 1 addition & 0 deletions packages/webui/src/client/ui/RundownView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
<SelectedElementsContext.Consumer>
{(selectionContext) => {
const isPropertiesPanelOpen = selectionContext.listSelectedElements().length > 0

return (
<div
className={classNames('rundown-view', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useState } from 'react'
import React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState } from 'react'
import {
AdLibActionId,
PartId,
Expand Down Expand Up @@ -215,12 +215,21 @@ export function useSelectedElements(
const [segment, setSegment] = useState<DBSegment | undefined>(undefined)
const rundownId = piece ? piece.startRundownId : part ? part.rundownId : segment?.rundownId

const lastValidPiece = useRef<Piece | undefined>(undefined)

useEffect(() => {
clearPendingChange() // element id changed so any pending change is for an old element

const computation = Tracker.nonreactive(() =>
Tracker.autorun(() => {
const piece = Pieces.findOne(selectedElement?.elementId)
let piece = Pieces.findOne(selectedElement?.elementId)

if (!piece && lastValidPiece.current && lastValidPiece.current._id === selectedElement?.elementId) {
piece = lastValidPiece.current
} else if (piece) {
lastValidPiece.current = piece
}

const part = UIParts.findOne({ _id: piece ? piece.startPartId : selectedElement?.elementId })
const segment = Segments.findOne({ _id: part ? part.segmentId : selectedElement?.elementId })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const SegmentContextMenu = withTranslation()(
)}
</>
)}
{part && !part.instance.part.invalid && timecode !== null && (
{part && timecode !== null && (
<>
<MenuItem
onClick={(e) => this.props.onSetNext(part.instance.part, e)}
Expand Down
11 changes: 5 additions & 6 deletions packages/webui/src/client/ui/SegmentTimeline/SourceLayerItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,14 @@ export const SourceLayerItem = (props: Readonly<ISourceLayerItemProps>): JSX.Ele
innerPiece.userEditProperties?.globalProperties ||
innerPiece.userEditProperties?.operations?.length
)

if (!hasEditableContent) return

const pieceId = innerPiece._id
if (!selectElementContext.isSelected(pieceId)) {
RundownViewEventBus.emit(RundownViewEvents.CLOSE_NOTIFICATIONS)
selectElementContext.clearAndSetSelection({ type: 'piece', elementId: pieceId })
} else {
selectElementContext.clearSelections()
}

RundownViewEventBus.emit(RundownViewEvents.CLOSE_NOTIFICATIONS)
selectElementContext.clearAndSetSelection({ type: 'piece', elementId: pieceId })

// Until a proper data structure, the only reference is a part.
// const partId = this.props.part.instance.part._id
// if (!selectElementContext.isSelected(partId)) {
Expand Down
Loading