Changed wxSizer::GetSize() to DoGetSize() (and others)
Added debug code because I dont know why buttons sometimes work and sometimes not. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,11 +41,14 @@ extern bool g_blockEventsOnDrag;
|
||||
|
||||
static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!button->m_hasVMT) return;
|
||||
if (g_blockEventsOnDrag) return;
|
||||
|
||||
|
||||
printf( "clicked: %s.\n", button->GetLabel().c_str() );
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
|
||||
event.SetEventObject(button);
|
||||
button->GetEventHandler()->ProcessEvent(event);
|
||||
|
@@ -290,14 +290,18 @@ void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) )
|
||||
|
||||
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
|
||||
{
|
||||
if ( Validate() && TransferDataFromWindow())
|
||||
printf( "OnOK 1.\n" );
|
||||
if (Validate() && TransferDataFromWindow())
|
||||
{
|
||||
printf( "OnOK 2.\n" );
|
||||
if (IsModal())
|
||||
{
|
||||
printf( "OnOK: modal.\n" );
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "OnOK: non-modal.\n" );
|
||||
SetReturnCode(wxID_OK);
|
||||
this->Show(FALSE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user