Skip to content

Commit

Permalink
fix navigation between settings and setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jul 9, 2024
1 parent 0094579 commit c641b7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions client/src/Annotation/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ export default () => {
}
}

const showAnnotationLab = () => {
preloadConfiguration();
const showAnnotationLab = (newSettings) => {
setSettings(newSettings);
const lastSavedImageIndex = newSettings.lastSavedImageIndex || 0;
if (newSettings.images.length > 0) {
fetchImages(newSettings.images, lastSavedImageIndex);
}
}
useEffect(() => {
preloadConfiguration();
Expand Down
4 changes: 2 additions & 2 deletions client/src/SetupPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const SetupPage = ({setConfiguration, settings, setShowLabel, showAnnotat
if(hasLabels) {
const newSettings = {...settings, showLab: true}
settingsConfig.changeSetting('settings',newSettings);
showAnnotationLab()
showAnnotationLab(newSettings)
}
}, [setShowLabel]);

Expand All @@ -133,7 +133,7 @@ export const SetupPage = ({setConfiguration, settings, setShowLabel, showAnnotat
if(hasLabels) {
const newSettings = {...settings, showLab: true}
settingsConfig.changeSetting('settings',newSettings);
showAnnotationLab()
showAnnotationLab(newSettings)
}
}

Expand Down

0 comments on commit c641b7d

Please sign in to comment.