KiCad PCB EDA Suite
Loading...
Searching...
No Matches
wx_dataviewctrl.h File Reference
#include <wx/dataview.h>

Go to the source code of this file.

Classes

class  WX_DATAVIEWCTRL
 Extension of the wxDataViewCtrl to include some helper functions for working with items. More...
 

Functions

void EnsureVisibleIfEnabled (wxDataViewCtrl *aWidget, const wxDataViewItem &aItem)
 Scroll aItem into view only when aWidget is currently enabled.
 

Function Documentation

◆ EnsureVisibleIfEnabled()

void EnsureVisibleIfEnabled ( wxDataViewCtrl * aWidget,
const wxDataViewItem & aItem )
inline

Scroll aItem into view only when aWidget is currently enabled.

On GTK, queueing scroll_to_path on a tree whose host frame has been disabled by a quasimodal child dialog races with concurrent model rebuilds and crashes GtkTreeView::validate_visible_area on the next frame-clock tick. The user can't see the scroll while the dialog is up anyway. wxWindow::IsEnabled() cascades through WINDOW_DISABLER on the parent frame, so this guard naturally suppresses the racy scroll for any quasimodal child.

Definition at line 86 of file wx_dataviewctrl.h.

Referenced by LIB_TREE::centerIfValid(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), LIB_TREE::selectIfValid(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().