Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Unloading TODO plugin makes the UI visible at a strange place
(1/1)
oBFusCATed:
Hi,
I found a bug in the TODO plugin.
The problem is that if the plugin is unloaded from Plugins->Manage... the UI from the plugin is shown on top of the manager pane.
I have this little patch, which fixes the problem, but looking at the svn blame for the commented line I can see that it was commented because of a crash.
Can you test this patch end to report if this is still the case.
I've done all my testing on linux, so I don't know what is the state on windows.
Killerbot any thoughts?
--- Code: ---Index: src/plugins/todo/todolist.cpp
===================================================================
--- src/plugins/todo/todolist.cpp (revision 7948)
+++ src/plugins/todo/todolist.cpp (working copy)
@@ -136,7 +136,8 @@
CodeBlocksDockEvent evt(cbEVT_REMOVE_DOCK_WINDOW);
evt.pWindow = m_pListLog->GetWindow();
Manager::Get()->ProcessEvent(evt);
-// delete m_pListLog;
+ m_pListLog->GetWindow()->Destroy();
+ delete m_pListLog;
}
else
{
@@ -144,7 +145,7 @@
// evt.window = m_pListLog->GetWindow();
Manager::Get()->ProcessEvent(evt);
}
- m_pListLog = 0;
+ m_pListLog = nullptr;
}
void ToDoList::BuildMenu(wxMenuBar* menuBar)
--- End code ---
oBFusCATed:
Seems this crash is similar to this one: http://forums.codeblocks.org/index.php/topic,16270.0.html
And the fix seems the same: http://cmpt.benbmp.org/codeblocks/patches/todo_load_unload.patch
Can anyone do some testing on windows of this patch?
Steps:
1. Load C::B
2. Plugins->Manage..
3. Load-unload the todo many times
4. Enable/disable Settings -> Environement -> Todo -> Include Todo window in massage pane
5. Repeat 3
6. Do some closing of C::B
Alpha:
Testing passed all listed steps (using Windows XP).
oBFusCATed:
In svn...
Navigation
[0] Message Index
Go to full version