[Scummvm-cvs-logs] scummvm-tools master -> 2366007cf50b127bc6aabdbbab09ba66a362975a

criezy criezy at scummvm.org
Fri Mar 1 23:17:20 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .

Summary:
2366007cf5 TOOLS: Fixed hanged application when running GUI tools


Commit: 2366007cf50b127bc6aabdbbab09ba66a362975a
    https://github.com/scummvm/scummvm-tools/commit/2366007cf50b127bc6aabdbbab09ba66a362975a
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2013-03-01T14:17:00-08:00

Commit Message:
TOOLS: Fixed hanged application when running GUI tools

This was a regression introduced by commit d02758e. It caused
onIdle() to be never called and as a result the application didn't show
progress from the tool thread and didn't know either when it had
finished.

Changed paths:
    gui/main.cpp
    gui/main.h



diff --git a/gui/main.cpp b/gui/main.cpp
index 1850da5..82edbab 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -226,9 +226,6 @@ ScummToolsFrame::ScummToolsFrame(const wxString &title, const wxPoint &pos, cons
 	_buttons = new WizardButtons(main, linetext, _configuration);
 	sizer->Add(_buttons, wxSizerFlags().Border().Center().Expand());
 
-	// Delete old panels on idle event
-	Connect(wxEVT_IDLE, wxIdleEventHandler(ScummToolsFrame::destroyOldPanels), NULL, this);
-
 	main->SetSizer(sizer);
 }
 
@@ -318,7 +315,7 @@ void ScummToolsFrame::switchPage(WizardPage *next, SwitchToPage page) {
 	_buttons->setPage(_pages.back(), newPanel);
 }
 
-void ScummToolsFrame::destroyOldPanels(wxIdleEvent &) {
+void ScummToolsFrame::destroyOldPanels() {
 	while (!_oldPanels.empty()) {
 		delete _oldPanels.back();
 		_oldPanels.pop_back();
@@ -375,6 +372,8 @@ void ScummToolsFrame::onMenuExit(wxCommandEvent &evt) {
 }
 
 void ScummToolsFrame::onIdle(wxIdleEvent &evt) {
+	// Delete old panels on idle event
+	destroyOldPanels();
 	if (_pages.back()->onIdle(dynamic_cast<wxPanel *>(_wizardpane->FindWindow(wxT("Wizard Page"))))) {
 		// We want more!
 		evt.RequestMore(true);
diff --git a/gui/main.h b/gui/main.h
index 936d2a8..e3e1f8f 100644
--- a/gui/main.h
+++ b/gui/main.h
@@ -124,7 +124,7 @@ private:
 	enum SwitchToPage { NextPage, PreviousPage, FirstPage };
 	void switchPage(WizardPage *nextPage, SwitchToPage page);
     
-	void destroyOldPanels(wxIdleEvent &evt);
+	void destroyOldPanels();
 
 	wxPanel *_wizardpane;
 






More information about the Scummvm-git-logs mailing list