From 97697157a7a9bdeb10d3e739e2e6a1d91b54a509 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 24 Jan 2016 06:34:14 +0100 Subject: [PATCH] ICEEditableShortcuts, not all observer were notified by scedSendDone --- src/ce_shortcutseditor.pas | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ce_shortcutseditor.pas b/src/ce_shortcutseditor.pas index d330036f..f343b0db 100644 --- a/src/ce_shortcutseditor.pas +++ b/src/ce_shortcutseditor.pas @@ -407,19 +407,25 @@ procedure TCEShortcutEditor.sendShortcuts; var i: integer; shc: TShortcutItem; + decl: ICEEditableShortCut = nil; cat: string; begin for i := 0 to fShortcuts.count-1 do begin shc := fShortcuts[i]; + decl:= shc.declarator; + if decl = nil then + continue; cat := findCategory(shc); if cat.isEmpty then continue; - if shc.declarator = nil then - continue; - shc.declarator.scedSendItem(cat, shc.identifier, shc.data); + decl.scedSendItem(cat, shc.identifier, shc.data); + if i = fShortcuts.count-1 then + decl.scedSendDone + // fShortcuts is always sorted by declarator, cf. receiveShortcuts() + else if decl <> fShortcuts[i+1].declarator then + decl.scedSendDone; end; - shc.declarator.scedSendDone; end; {$ENDREGION}