File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,14 +95,15 @@ export function anchorInjection() {
9595
9696 if ( isExistingNote ) {
9797 const closeHookId = Hooks . on ( "closeDocumentSheetV2" , async ( documentSheet ) => {
98- if ( ! ( documentSheet instanceof NoteConfig ) ) return ;
98+ if ( ! ( documentSheet instanceof foundry . applications . sheets . NoteConfig ) ) return ;
9999 if ( noteConfig . document . id !== documentSheet . document . id ) return ;
100100 Hooks . off ( "closeDocumentSheetV2" , closeHookId ) ;
101101 const selectedSlug = documentSheet . document . getFlag ( CONSTANTS . FLAG_NAME , "slugLink" ) ;
102102 if ( selectedSlug && selectedSlug . trim ( ) !== "" && selectedSlug !== documentSheet . document . flags . ddb ?. slugLink ) {
103103 const update = setSlugProperties ( { _id : documentSheet . document . id } , selectedSlug , documentSheet . document . label ) ;
104104 await canvas . scene . updateEmbeddedDocuments ( "Note" , [ update ] ) ;
105105 }
106+ game . canvas . notes . draw ( ) ;
106107 } ) ;
107108 }
108109 } ) ;
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ export async function dynamicIcons() {
1111 const sourceTexture = noteConfig . document ?. texture ?. src ;
1212
1313 const formGroupCustomElement = form . querySelector ( "[data-icon-custom]" ) ;
14- const customItemElement = form . querySelector ( "input [name='icon.custom']" ) ;
15- if ( Icons . textureExists ( noteConfig . document . texture . src ) && sourceTexture ) {
16- noteConfig . object . texture . src = `${ noteConfig . document . _source . texture . src } ` ;
14+ const customItemElement = form . querySelector ( "file-picker [name='icon.custom'] > input " ) ;
15+ if ( sourceTexture && Icons . textureExists ( noteConfig . document . texture . src ) ) {
16+ // noteConfig.object.texture.src = `${noteConfig.document._source.texture.src}`;
1717 const customIcon = ! Object . values ( CONFIG . JournalEntry . noteIcons ) . includes ( sourceTexture ) ;
1818 data . icon = {
1919 selected : customIcon ? "" : sourceTexture ,
You can’t perform that action at this time.
0 commit comments