Loading and saving breaks the Main Menu GUI

Issue #124 resolved
Carsten Fuchs created an issue

As reported at http://www.cafu.de/forum/viewtopic.php?p=5425#p5425, loading the Main Menu into the GUI Editor, moving a window, and saving again breaks the Main Menu.

It looks as if the GUI Editor attempts to prevent duplicated window names by renaming them, inherently causing the error.

We have to check if the name checking really should be done at a global level, as is now, or if checking the siblings of the current window is enough.

Alternatively, the problem might be fixed by updating MainMenu_main.cgui the reflect the disambiguated names.

Comments (5)

  1. Carsten Fuchs reporter

    Related previous work: - #87 - #89 - r386 - r388

    It looks like the previous measures were right, but maybe a bit over-aggressive: Windows names need not be unique ''globally'', it's probably sufficient if they're unique among their ''siblings''.

  2. Carsten Fuchs reporter

    (In [662]) GuiSys: Make m_Parent and m_Children of WindowT private.

    These two members were publicly accessible before, and thus the WindowT class had its implementation details badly encapsulated. (Probably because former user code was badly written, apparently needing the "flexibility" of direct access. Such occurrences were fixed in this revision, and r661 was another example as well.)

    This change improves encapsulation, and prepares a fix for #124.

    See #124.

  3. Carsten Fuchs reporter

    (In [663]) GuiSys: Rename member Name of WindowT to m_Name, and make it private.

    Similar to the preceding change r662, this revision enhances the encapsulation and as a side-effect prepares the fix for #124.

    See #124.

  4. Log in to comment