Fix error deleting the mini-editor after the color bar is destroyed.

The "editors" module was moved out from LegacyModules class.
This commit is contained in:
David Capello 2011-08-06 14:36:40 -03:00
parent 604deab93e
commit 8c52068eb4
3 changed files with 8 additions and 2 deletions

View File

@ -27,6 +27,8 @@ For next release
Refactoring
-----------
- About Signals/Slots: Add some field in slots to avoid disconnecting
them from dead signals.
- Eradicate JList.
- Replace JRect & jrect with gfx::Rect.
- Create gfx::Region to replace JRegion & jregion.

View File

@ -132,6 +132,9 @@ App::App(int argc, char* argv[])
m_modules = new Modules();
m_isGui = !(m_checkArgs->isConsoleOnly());
m_legacy = new LegacyModules(isGui() ? REQUIRE_INTERFACE: 0);
// Initialize editors.
init_module_editors();
// Register well-known image file types.
FileFormatsManager::instance().registerAllFormats();
@ -308,6 +311,9 @@ int App::run()
// widgets (e.g. color bar).
jwidget_free(box_editors);
// Destroy mini-editor.
exit_module_editors();
// Destroy the top-window
jwidget_free(top_window);
top_window = NULL;

View File

@ -19,7 +19,6 @@
#include "config.h"
#include "modules.h"
#include "modules/editors.h"
#include "modules/gui.h"
#include "modules/palettes.h"
#include "modules/rootmenu.h"
@ -44,7 +43,6 @@ static Module module[] =
DEF_MODULE(palette, 0),
DEF_MODULE(gui, REQUIRE_INTERFACE),
DEF_MODULE(rootmenu, REQUIRE_INTERFACE),
DEF_MODULE(editors, REQUIRE_INTERFACE),
};
static int modules = sizeof(module) / sizeof(Module);