OSDN Git Service

Correct unicode problem when duplicating a note.
authorRandy Baumgarte <randy@fbn.cx>
Mon, 27 Sep 2010 20:56:48 +0000 (16:56 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Fri, 1 Oct 2010 16:43:08 +0000 (12:43 -0400)
src/cx/fbn/nevernote/NeverNote.java

index ded0e02..ceba208 100644 (file)
@@ -3425,14 +3425,9 @@ public class NeverNote extends QMainWindow{
     }
     private void duplicateNote(String guid) {
                
-               Calendar currentTime = new GregorianCalendar();
-               Long l = new Long(currentTime.getTimeInMillis());
-               String newGuid = new String(Long.toString(l));
-                                       
                Note oldNote = conn.getNoteTable().getNote(guid, true, true, false, false, false);
-               Note newNote = oldNote.deepCopy();
-               newNote.setGuid(newGuid);
                List<Resource> resList = conn.getNoteTable().noteResourceTable.getNoteResources(guid, true);
+               oldNote.setContent(conn.getNoteTable().getNoteContentBinary(guid));
                oldNote.setResources(resList);
                duplicateNote(oldNote);
        }