[EMAIL PROTECTED] (Lars Gullik Bj�nnes) writes:
| John Levon <[EMAIL PROTECTED]> writes:
|
| | clicking on navigate menu when there are figures (e.g. userguide)
| | crashes
|
| I get the most peculiar backtrace:
And this fix the crash:
Index: MenuBackend.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/MenuBackend.C,v
retrieving revision 1.59
diff -u -p -r1.59 MenuBackend.C
--- MenuBackend.C 8 Dec 2002 22:33:55 -0000 1.59
+++ MenuBackend.C 9 Dec 2002 10:10:02 -0000
@@ -504,8 +504,9 @@ void expandToc(Menu & tomenu, Buffer con
menu->add(MenuItem(MenuItem::Command,
label, ccit->action()));
}
- MenuItem item(MenuItem::Submenu,
- _(floats[cit->first]->second.name()));
+ string const & floatName = cit->first;
+ // Is the _(...) really needed here? (Lgb)
+ MenuItem item(MenuItem::Submenu, _(floatName));
item.submenu(menu);
tomenu.add(item);
}
We are doing bad things here, since we in the toc dialog show direcly
what is in internal structures (in the TOC,Figure,Table drop-down).
And the menu expander use the same structure to build the menus... so
when I changed (hackish) the internal structure to store the GUI
names, the menu expander broke, only finding Floating(0x0) which would
then obviously crash...
All this is something we should look at bit at later.
--
Lgb