mirror of https://github.com/fltk/fltk
Added "delete local_array[]" to Fl_Menu_Item::insert().
Moved value_->hide() in Fl_Tabs::value() before show to avoid bug when there is only 1 child (fix from Petr Vilim). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@620 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
701141bcfe
commit
5dadca9c90
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Menu_add.cxx,v 1.9.2.1 1999/04/19 07:01:23 bill Exp $"
|
||||
// "$Id: Fl_Menu_add.cxx,v 1.9.2.2 1999/07/06 16:16:38 mike Exp $"
|
||||
//
|
||||
// Menu utilities for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -61,6 +61,7 @@ static Fl_Menu_Item* insert(
|
|||
local_array_alloc = 2*size;
|
||||
Fl_Menu_Item* newarray = new Fl_Menu_Item[local_array_alloc];
|
||||
memmove(newarray, array, size*sizeof(Fl_Menu_Item));
|
||||
delete[] local_array;
|
||||
local_array = array = newarray;
|
||||
}
|
||||
// move all the later items:
|
||||
|
@ -228,5 +229,5 @@ void Fl_Menu_::remove(int i) {
|
|||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.1 1999/04/19 07:01:23 bill Exp $".
|
||||
// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.2 1999/07/06 16:16:38 mike Exp $".
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Tabs.cxx,v 1.6 1999/01/07 19:17:27 mike Exp $"
|
||||
// "$Id: Fl_Tabs.cxx,v 1.6.2.1 1999/07/06 16:16:38 mike Exp $"
|
||||
//
|
||||
// Tab widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -174,8 +174,8 @@ Fl_Widget* Fl_Tabs::value() {
|
|||
|
||||
int Fl_Tabs::value(Fl_Widget *o) {
|
||||
if (value_ == o) return 0;
|
||||
if (o) o->show();
|
||||
if (value_) value_->hide();
|
||||
if (o) o->show();
|
||||
value_ = o;
|
||||
redraw();
|
||||
do_callback();
|
||||
|
@ -259,5 +259,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
|
|||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Tabs.cxx,v 1.6 1999/01/07 19:17:27 mike Exp $".
|
||||
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.1 1999/07/06 16:16:38 mike Exp $".
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue