Speed fix for wxGenericDirCtrl, starting to add text input control;
added wxWS_EX_NO_AUTOFOCUS for wxMSW so we can stop wxToolBar accepting the focus; UI update improvement to send commands to current focus window; split tree control horiz. scrollbar problem fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -427,18 +427,20 @@ void wxFrameBase::DoMenuUpdates()
|
||||
{
|
||||
wxMenuBar* bar = GetMenuBar();
|
||||
|
||||
wxWindow* focusWin = wxFindFocusDescendant((wxWindow*) this);
|
||||
|
||||
if ( bar != NULL )
|
||||
{
|
||||
int nCount = bar->GetMenuCount();
|
||||
for (int n = 0; n < nCount; n++)
|
||||
DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL);
|
||||
DoMenuUpdates(bar->GetMenu(n), focusWin);
|
||||
}
|
||||
}
|
||||
|
||||
// update a menu and all submenus recursively
|
||||
void wxFrameBase::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin))
|
||||
void wxFrameBase::DoMenuUpdates(wxMenu* menu, wxWindow* focusWin)
|
||||
{
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
|
||||
wxMenuItemList::Node* node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
|
||||
@@ -526,7 +526,13 @@ void wxToolBarBase::OnIdle(wxIdleEvent& event)
|
||||
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
|
||||
void wxToolBarBase::DoToolbarUpdates()
|
||||
{
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
wxWindow* parent = this;
|
||||
while (parent->GetParent())
|
||||
parent = parent->GetParent();
|
||||
|
||||
wxWindow* focusWin = wxFindFocusDescendant(parent);
|
||||
|
||||
wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler() ;
|
||||
|
||||
for ( wxToolBarToolsList::Node* node = m_tools.GetFirst();
|
||||
node;
|
||||
|
||||
@@ -421,7 +421,7 @@ wxSize wxWindowBase::DoGetBestSize() const
|
||||
node = node->GetNext() )
|
||||
{
|
||||
wxWindow *win = node->GetData();
|
||||
if ( win->IsTopLevel() || wxDynamicCast(win, wxStatusBar) )
|
||||
if ( win->IsTopLevel() || wxDynamicCast(win, wxStatusBar) || !win->IsShown())
|
||||
{
|
||||
// dialogs and frames lie in different top level windows -
|
||||
// don't deal with them here; as for the status bars, they
|
||||
|
||||
Reference in New Issue
Block a user