Skip to content

Commit 4bc4b74

Browse files
committed
reexamined WIDGET_EVENT and all event loops, make wxWidgets loop run when needed, and found that WIDGET_EVENT was returning events AFTER event processing, not before. This was the sole reason of gnudatalanguage#1685. Thus removed the unnecessary (and wrong) patch made in 1716
HANDLER is now 0 in all structures created by widgets events, to be updated eventually by user event_pro or event_func. wxLoop is called way more frequently than before, at times when it is needed, widgets shoudl be more reactive.
1 parent 95983ac commit 4bc4b74

File tree

4 files changed

+64
-65
lines changed

4 files changed

+64
-65
lines changed

src/gdlwidget.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -5632,12 +5632,13 @@ GDLWidgetTree::GDLWidgetTree( WidgetIDT p, EnvT* e, BaseGDL* value_, DULong even
56325632
} //else throw GDLException("Parent tree widget is not a folder."); //IDL just forgets.
56335633
}
56345634
void GDLWidgetTree::OnRealize(){
5635-
GDLWidgetTree* root=this->GetMyRootGDLWidgetTree();
5636-
if (this==root) {
5637-
wxTreeCtrlGDL* ctrl=static_cast<wxTreeCtrlGDL*>(this->GetWxWidget());
5638-
wxTreeItemId id=ctrl->GetFirstVisibleItem ( ) ;
5639-
if (id) ctrl->SetFocusedItem(id);
5640-
}
5635+
// not useful? root node does not seem selected at creation with *DL.
5636+
// GDLWidgetTree* root=this->GetMyRootGDLWidgetTree();
5637+
// if (this==root) {
5638+
// wxTreeCtrlGDL* ctrl=static_cast<wxTreeCtrlGDL*>(this->GetWxWidget());
5639+
// wxTreeItemId id=ctrl->GetFirstVisibleItem ( ) ;
5640+
// if (id) ctrl->SetFocusedItem(id);
5641+
// }
56415642
}
56425643
DInt GDLWidgetTree::GetTreeIndex()
56435644
{

0 commit comments

Comments
 (0)