@@ -31,13 +31,13 @@ import {
31
31
appendMoleculeToCompoundsOfDatasetToBuy ,
32
32
removeMoleculeFromCompoundsOfDatasetToBuy ,
33
33
setCrossReferenceCompoundName ,
34
- setIsOpenCrossReferenceDialog
34
+ setIsOpenCrossReferenceDialog ,
35
+ setInspirationFragmentList
35
36
} from './redux/actions' ;
36
37
import { centerOnLigandByMoleculeID } from '../../reducers/ngl/dispatchActions' ;
37
38
import { ArrowDownward , ArrowUpward , MyLocation } from '@material-ui/icons' ;
38
39
import { isNumber , isString } from 'lodash' ;
39
40
import { SvgTooltip } from '../common' ;
40
- import { loadInspirationMoleculesDataList , clearAllInspirationsOfDataset } from './redux/dispatchActions' ;
41
41
import { OBJECT_TYPE } from '../nglView/constants' ;
42
42
import { getRepresentationsByType } from '../nglView/generatingObjects' ;
43
43
@@ -522,9 +522,15 @@ export const DatasetMoleculeView = memo(
522
522
523
523
const nextItem = ( nextItemData . hasOwnProperty ( 'molecule' ) && nextItemData . molecule ) || nextItemData ;
524
524
const nextDatasetID = ( nextItemData . hasOwnProperty ( 'datasetID' ) && nextItemData . datasetID ) || datasetID ;
525
+ const moleculeTitleNext = nextItem && nextItem . name ;
525
526
526
527
moveSelectedMoleculeSettings ( nextItem , nextDatasetID ) ;
527
528
dispatch ( moveSelectedMoleculeInspirationsSettings ( data , nextItem ) ) ;
529
+ dispatch ( setInspirationFragmentList ( nextItem . computed_inspirations ) ) ;
530
+ dispatch ( setCrossReferenceCompoundName ( moleculeTitleNext ) ) ;
531
+ if ( setRef ) {
532
+ setRef ( ref . current . nextSibling ) ;
533
+ }
528
534
} ;
529
535
530
536
const handleClickOnUpArrow = ( ) => {
@@ -535,9 +541,15 @@ export const DatasetMoleculeView = memo(
535
541
( previousItemData . hasOwnProperty ( 'molecule' ) && previousItemData . molecule ) || previousItemData ;
536
542
const previousDatasetID =
537
543
( previousItemData . hasOwnProperty ( 'datasetID' ) && previousItemData . datasetID ) || datasetID ;
544
+ const moleculeTitlePrev = previousItem && previousItem . name ;
538
545
539
546
moveSelectedMoleculeSettings ( previousItem , previousDatasetID ) ;
540
547
dispatch ( moveSelectedMoleculeInspirationsSettings ( data , previousItem ) ) ;
548
+ dispatch ( setInspirationFragmentList ( previousItem . computed_inspirations ) ) ;
549
+ dispatch ( setCrossReferenceCompoundName ( moleculeTitlePrev ) ) ;
550
+ if ( setRef ) {
551
+ setRef ( ref . current . previousSibling ) ;
552
+ }
541
553
} ;
542
554
543
555
const moleculeTitle = data && data . name ;
0 commit comments