From a529510e5b8f84b15aacd103936df89bb767bb29 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 26 Jul 2004 20:52:52 +0000 Subject: More documentation updates... Fl_File_Chooser did not handle some cases for filename completion (STR #376) Fl_Help_View didn't properly compute the default maximum width of the page properly, resulting in non-wrapped text in table cells (STR #464) Fl_Text_Editor no longer tries to emulate the Emacs CTRL-A shortcut to move to the first column, since there is a key for that and the widget does not emulate any other Emacs keys (STR #421) Fl_File_Chooser always disabled the OK button when the user pressed DELETE or BACKSPACE (STR #397) Added Fl_Browser::swap() methods (STR #459) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3698 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Fl_Menu.cxx') diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index e901e7817..7a62f0a2d 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.32 2004/06/08 14:11:59 easysw Exp $" +// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.33 2004/07/26 20:52:51 easysw Exp $" // // Menu code for the Fast Light Tool Kit (FLTK). // @@ -240,7 +240,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, set_modal(); clear_border(); menu = m; - m = m->first(); // find the first item that needs to be rendered + if (m) m = m->first(); // find the first item that needs to be rendered drawn_selected = -1; if (button) { box(button->box()); @@ -405,7 +405,7 @@ int menuwindow::find_selected(int mx, int my) { if (my < 0 || my >= h()) return -1; if (!itemheight) { // menubar int xx = 3; int n = 0; - const Fl_Menu_Item* m = menu->first(); + const Fl_Menu_Item* m = menu ? menu->first() : 0; for (; ; m = m->next(), n++) { if (!m->text) return -1; xx += m->measure(0, button) + 16; @@ -791,5 +791,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.32 2004/06/08 14:11:59 easysw Exp $". +// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.33 2004/07/26 20:52:51 easysw Exp $". // -- cgit v1.2.3