Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Problem with serialization and undo/redo

Help
2009-06-15
2013-04-08
  • Andreas Krinke
    Andreas Krinke
    2009-06-15

    Hello!

    At first I want to thank you for this great framework!

    I have a problem with a class derived from wxSFLineShape I'm using for connections. It has two member variables, a pointer to a RoundRectShape and one to a TextShape. The rect is a child of the connection and the text is a child of the rect.

    The two members have serialization disabled and have XS_SERIALIZE_DYNAMIC_OBJECT_NO_CREATE set.

    In the copy constructor, they are cloned and added as childs.

    The problem is, after the creation of the connection and a undo and redo, the TextShape is no longer visible. Not like Show(false) -- just not there.

    I have uploaded the source of the class:

    http://pastebin.com/f629b72dd

    I'm really stuck here :/

    Regards,
    Andreas

     
    • Andreas Krinke
      Andreas Krinke
      2009-06-15

      Yeaha!

      I've compiled the latest SVN revision (214) and the error seems to be gone!

      FWIW, the old version was 1.7.2b.

      Regards,
      Andreas