Skip to content

Commit 7cc3d49

Browse files
committed
Fix diff view of commit tree
1 parent bc93fb9 commit 7cc3d49

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/components/extended-reality/visualization/page-setup/bottom-bar/evolution/evolution-rendering-buttons.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useRef } from 'react';
1+
import { useRef } from 'react';
22
import {
33
useCommitTreeStateStore,
44
SelectedCommit,
@@ -32,6 +32,7 @@ export default function EvolutionRenderingButtons(args: IArgs) {
3232

3333
const visService = useVisibilityServiceStore(
3434
useShallow((state) => ({
35+
configuration: state._evolutionModeRenderingConfiguration,
3536
applyEvolutionModeRenderingConfiguration:
3637
state.applyEvolutionModeRenderingConfiguration,
3738
getCloneOfEvolutionModeRenderingConfiguration:
@@ -122,12 +123,14 @@ export default function EvolutionRenderingButtons(args: IArgs) {
122123
{args.selectedCommits.get(args.selectedAppName)?.length === 2 && (
123124
<div className="col-md-auto">
124125
<div className="d-flex">
125-
<div className="mr-2">Only show differences</div>
126+
<div style={{ 'margin-right': '4rem' }}>
127+
Only show differences
128+
</div>
126129
<div className="d-flex">
127130
<label className="wide-checkbox-container">
128131
<input
129132
type="checkbox"
130-
checked={checkboxValues.current.renderOnlyDifferences}
133+
checked={visService.configuration.renderOnlyDifferences}
131134
onChange={() => changeAnalysisMode('difference')}
132135
/>
133136
<span className="wide-checkbox"></span>

src/components/visualization/page-setup/bottom-bar/evolution/plotly-commit-tree.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ export default function PlotlyCommitTree({
387387
layout,
388388
getPlotlyOptionsObject()
389389
);
390-
} else {
391-
console.log('No commits found for selected application!');
392390
}
393391
};
394392

src/stores/visibility-service.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ export const useVisibilityServiceStore = create<VisibilityServiceState>(
107107
useRenderingServiceStore.getState()._landscapeData
108108
?.structureLandscapeData;
109109

110-
for (const applicationObject3D of useApplicationRendererStore.getState()
111-
.openApplications) {
110+
for (const applicationObject3D of useApplicationRendererStore
111+
.getState()
112+
.openApplicationsMap.values()) {
112113
const hideVis = (
113114
type: TypeOfAnalysis,
114115
keepMeshesNecessaryForDifference: boolean = false
@@ -189,7 +190,7 @@ export const useVisibilityServiceStore = create<VisibilityServiceState>(
189190
) => {
190191
structure?.nodes.forEach((node) => {
191192
const app = node.applications.find(
192-
(a) => a.id === applicationObject3D.data.application.id
193+
(a) => a.id === applicationObject3D.getModelId()
193194
);
194195

195196
if (app) {
@@ -311,7 +312,7 @@ export const useVisibilityServiceStore = create<VisibilityServiceState>(
311312
) => {
312313
structure?.nodes.forEach((node) => {
313314
const app = node.applications.find(
314-
(a) => a.id === applicationObject3D.data.application.id
315+
(a) => a.id === applicationObject3D.getModelId()
315316
);
316317

317318
if (app) {

0 commit comments

Comments
 (0)