Fixed wxListCtrl::GetNextItem()
Fixed bug in handling wxLC_NO_HEADER, Moved logmessage stuff out of idle_recursion protection so that log dialogs get idle events git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
29e7e51a4d
commit
ea451729db
@ -2334,7 +2334,7 @@ long wxListMainWindow::GetNextItem( long item, int WXUNUSED(geometry), int state
|
|||||||
long ret = 0;
|
long ret = 0;
|
||||||
if (item > 0) ret = item;
|
if (item > 0) ret = item;
|
||||||
if(ret >= GetItemCount()) return -1;
|
if(ret >= GetItemCount()) return -1;
|
||||||
wxNode *node = m_lines.Nth( (size_t)ret );
|
wxNode *node = m_lines.Nth( (size_t)++ret );
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxListLineData *line = (wxListLineData*)node->Data();
|
wxListLineData *line = (wxListLineData*)node->Data();
|
||||||
@ -2715,9 +2715,15 @@ bool wxListCtrl::Create(wxWindow *parent,
|
|||||||
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, style );
|
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, style );
|
||||||
|
|
||||||
if (HasFlag(wxLC_REPORT))
|
if (HasFlag(wxLC_REPORT))
|
||||||
|
{
|
||||||
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
|
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
|
||||||
|
if (HasFlag(wxLC_NO_HEADER))
|
||||||
|
m_headerWin->Show( FALSE );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_headerWin = (wxListHeaderWindow *) NULL;
|
m_headerWin = (wxListHeaderWindow *) NULL;
|
||||||
|
}
|
||||||
|
|
||||||
SetBackgroundColour( *wxWHITE );
|
SetBackgroundColour( *wxWHITE );
|
||||||
|
|
||||||
|
@ -775,6 +775,7 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event))
|
|||||||
m_showingDetails = !m_showingDetails;
|
m_showingDetails = !m_showingDetails;
|
||||||
|
|
||||||
// in any case, our size changed - update
|
// in any case, our size changed - update
|
||||||
|
sizer->SetSizeHints(this);
|
||||||
sizer->Fit(this);
|
sizer->Fit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "wx/font.h"
|
#include "wx/font.h"
|
||||||
#include "wx/colour.h"
|
#include "wx/colour.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
|
#include "wx/log.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/generic/panelg.h"
|
#include "wx/generic/panelg.h"
|
||||||
|
@ -138,9 +138,6 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
|||||||
// thread so we must lock it here ourselves
|
// thread so we must lock it here ourselves
|
||||||
gdk_threads_enter();
|
gdk_threads_enter();
|
||||||
|
|
||||||
/* sent idle event to all who request them */
|
|
||||||
while (wxTheApp->ProcessIdle()) { }
|
|
||||||
|
|
||||||
/* we don't want any more idle events until the next event is
|
/* we don't want any more idle events until the next event is
|
||||||
sent to wxGTK */
|
sent to wxGTK */
|
||||||
gtk_idle_remove( wxTheApp->m_idleTag );
|
gtk_idle_remove( wxTheApp->m_idleTag );
|
||||||
@ -153,6 +150,9 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
|||||||
emptied */
|
emptied */
|
||||||
g_isIdle = TRUE;
|
g_isIdle = TRUE;
|
||||||
|
|
||||||
|
/* sent idle event to all who request them */
|
||||||
|
while (wxTheApp->ProcessIdle()) { }
|
||||||
|
|
||||||
// release lock again
|
// release lock again
|
||||||
gdk_threads_leave();
|
gdk_threads_leave();
|
||||||
|
|
||||||
@ -366,13 +366,6 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
|||||||
/* 'Garbage' collection of windows deleted with Close(). */
|
/* 'Garbage' collection of windows deleted with Close(). */
|
||||||
DeletePendingObjects();
|
DeletePendingObjects();
|
||||||
|
|
||||||
/* flush the logged messages if any */
|
|
||||||
#if wxUSE_LOG
|
|
||||||
wxLog *log = wxLog::GetActiveTarget();
|
|
||||||
if (log != NULL && log->HasPendingMessages())
|
|
||||||
log->Flush();
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
/* Send OnIdle events to all windows */
|
/* Send OnIdle events to all windows */
|
||||||
bool needMore = SendIdleEvents();
|
bool needMore = SendIdleEvents();
|
||||||
|
|
||||||
@ -380,6 +373,13 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
|||||||
event.RequestMore(TRUE);
|
event.RequestMore(TRUE);
|
||||||
|
|
||||||
s_inOnIdle = FALSE;
|
s_inOnIdle = FALSE;
|
||||||
|
|
||||||
|
/* flush the logged messages if any */
|
||||||
|
#if wxUSE_LOG
|
||||||
|
wxLog *log = wxLog::GetActiveTarget();
|
||||||
|
if (log != NULL && log->HasPendingMessages())
|
||||||
|
log->Flush();
|
||||||
|
#endif // wxUSE_LOG
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxApp::SendIdleEvents()
|
bool wxApp::SendIdleEvents()
|
||||||
|
@ -138,9 +138,6 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
|||||||
// thread so we must lock it here ourselves
|
// thread so we must lock it here ourselves
|
||||||
gdk_threads_enter();
|
gdk_threads_enter();
|
||||||
|
|
||||||
/* sent idle event to all who request them */
|
|
||||||
while (wxTheApp->ProcessIdle()) { }
|
|
||||||
|
|
||||||
/* we don't want any more idle events until the next event is
|
/* we don't want any more idle events until the next event is
|
||||||
sent to wxGTK */
|
sent to wxGTK */
|
||||||
gtk_idle_remove( wxTheApp->m_idleTag );
|
gtk_idle_remove( wxTheApp->m_idleTag );
|
||||||
@ -153,6 +150,9 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
|||||||
emptied */
|
emptied */
|
||||||
g_isIdle = TRUE;
|
g_isIdle = TRUE;
|
||||||
|
|
||||||
|
/* sent idle event to all who request them */
|
||||||
|
while (wxTheApp->ProcessIdle()) { }
|
||||||
|
|
||||||
// release lock again
|
// release lock again
|
||||||
gdk_threads_leave();
|
gdk_threads_leave();
|
||||||
|
|
||||||
@ -366,13 +366,6 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
|||||||
/* 'Garbage' collection of windows deleted with Close(). */
|
/* 'Garbage' collection of windows deleted with Close(). */
|
||||||
DeletePendingObjects();
|
DeletePendingObjects();
|
||||||
|
|
||||||
/* flush the logged messages if any */
|
|
||||||
#if wxUSE_LOG
|
|
||||||
wxLog *log = wxLog::GetActiveTarget();
|
|
||||||
if (log != NULL && log->HasPendingMessages())
|
|
||||||
log->Flush();
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
/* Send OnIdle events to all windows */
|
/* Send OnIdle events to all windows */
|
||||||
bool needMore = SendIdleEvents();
|
bool needMore = SendIdleEvents();
|
||||||
|
|
||||||
@ -380,6 +373,13 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
|||||||
event.RequestMore(TRUE);
|
event.RequestMore(TRUE);
|
||||||
|
|
||||||
s_inOnIdle = FALSE;
|
s_inOnIdle = FALSE;
|
||||||
|
|
||||||
|
/* flush the logged messages if any */
|
||||||
|
#if wxUSE_LOG
|
||||||
|
wxLog *log = wxLog::GetActiveTarget();
|
||||||
|
if (log != NULL && log->HasPendingMessages())
|
||||||
|
log->Flush();
|
||||||
|
#endif // wxUSE_LOG
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxApp::SendIdleEvents()
|
bool wxApp::SendIdleEvents()
|
||||||
|
Loading…
Reference in New Issue
Block a user