]> git.mxchange.org Git - flightgear.git/commit
Melchior FRANZ:
authorehofman <ehofman>
Tue, 29 Mar 2005 08:35:13 +0000 (08:35 +0000)
committerehofman <ehofman>
Tue, 29 Mar 2005 08:35:13 +0000 (08:35 +0000)
commit019a7a186b01ed4d889421e9c22400752047f5b4
tree1d2310dd0eb507cf010ad72cd436888f13ae147d
parent71dd0f8f9669c123d13e12790d33de6914b498d2
Melchior FRANZ:

showDialog() is careful not to create a new FGDialog() if a dialog with the
same name is already open (active). But at this point it is already too late:
newDialog(), which was called shortly before, has already overwritten the
dialog properties. This leads to animated garbage in the best case, and a
segfault in format_callback() in the worst case.

- GUI::newDialog(): Don't you overwrite properties of an active dialog!
- GUI::readDir(): You may do that, but delete the old dialog first!
  (necessary for reloading the GUI)

- FGDialog::makeObject(): only set format_callback() with setRenderCallback()
  if the property is "live". Otherwise, only call it once at construction
  time. This isn't only a performance improvement. Without this the label
  was growing until it hit the limit (256).
src/GUI/dialog.cxx
src/GUI/new_gui.cxx