Summary: | Action "Add a note" could edit an existing note (not erase it) | ||
---|---|---|---|
Product: | [Applications] lokalize | Reporter: | Lasse Liehu <lasse.liehu> |
Component: | editor | Assignee: | Nick Shaforostoff <shafff> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch with minor modifications to make the fix work |
Description
Lasse Liehu
2011-11-21 22:04:28 UTC
i couldnt reproduce this behaviour. if the note is present, then 'edit' link is displayed instead of 'add note'. do you work with PO or XLIFF? can you send me the file with notes? Yes, that way works fine. This bug is about "the toolbar action / keyboard shortcut". I'm working with PO files (KDE ones to be exact). Should happen with every PO file. Don't know about XLIFF files. Example steps to reproduce for the keyboard shortcut: 1. Open a .po file 2. From menu Settings | Configure Shortcuts... 3. Add Ctrl+Alt+H as the shortcut for "Add a note" and press OK 2. Press Ctrl+Alt+H and type a note. 3. Save it and press Ctrl+Alt+H again Steps to reproduce for the toolbar action: 1. Open a .po file 2. From menu Settings | Configure Toolbars... 3. Add action "Add a note" to the "Main Toolbar <Editor>" and press OK 4. Click that button on the toolbar and type a note. 5. Save it and press the button again In both cases the edit box now opens empty (not with the existing note's content). Thus if the note is now saved, the old one is lost. Canceling preserves it. The action is connected to MsgCtxtView::addNoteUI() in EditorTab::setupActions(). It always simulates clicking "note:/add" whereas "Edit..." link is "note:/%1" with some value. ok, now i see the problem SVN commit 1267125 by shaforo: BUG: 287198 make overwriting existing notes impossible: edit existing note instead, if multiple notes are not supported (this is the case for PO) M +1 -1 editortab.cpp M +13 -5 msgctxtview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1267125 This fix crashes for me when adding a new note (if it didn't already exist) and doesn't edit the existing note, either. Thanks for quick response by the way. Created attachment 66428 [details]
Patch with minor modifications to make the fix work
With these modifications it now works for both cases mentioned in the previous comment.
SVN commit 1267265 by shaforo: CCBUG: 287198 fix crash ;) thanks for the feedback, Lasse! M +6 -6 msgctxtview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1267265 |