diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index fee6ad9a2b1c917260b53d3af4240c9329056385..5d00b3fd3a9cb03f5cb234d25d7a2b9f907eef65 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -314,7 +314,6 @@ FlGui::FlGui(int argc, char **argv) // graphic window should have the initial focus (so we can e.g. directly loop // through time steps with the keyboard) - //graph[0]->gl[0]->take_focus(); Fl::focus(graph[0]->gl[0]); // get onelab tree group (FIXME: should clean this up) diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index 39b2846250ab6089d16f9712b69430e52d915b30..e44d168dcc6d3abe1139da57a8ceaa224ee2cc62 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -1573,8 +1573,10 @@ void onelabGroup::rebuildTree(bool deleteWidgets) delStrings = _treeStrings; _treeWidgets.clear(); _treeStrings.clear(); - // make sure we remove the focus from any widget that will be deleted - _tree->take_focus(); + // make sure we remove the focus from any widget that will be deleted; not + // sure if this is still necessary; if it is, we should only do it if the + // focus is not in the graphical window: + // _tree->take_focus(); } _addGmshMenus();