fix circular dependancy, credit Kaev
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "MapCreationWizard.hpp"
|
||||
|
||||
#include <noggit/ui/FontAwesome.hpp>
|
||||
#include <noggit/ui/windows/noggitWindow/NoggitWindow.hpp>
|
||||
#include <noggit/ui/widgets/Vector3Widget.hpp>
|
||||
#include <noggit/project/CurrentProject.hpp>
|
||||
#include <blizzard-database-library/include/structures/Types.h>
|
||||
@@ -11,6 +10,7 @@
|
||||
#include <noggit/World.h>
|
||||
#include <noggit/application/Utils.hpp>
|
||||
#include <noggit/Log.h>
|
||||
#include <noggit/ui/windows/noggitWindow/NoggitWindow.hpp>
|
||||
|
||||
#include <util/qt/overload.hpp>
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <noggit/World.h>
|
||||
#include <noggit/application/NoggitApplication.hpp>
|
||||
|
||||
|
||||
namespace Noggit
|
||||
{
|
||||
namespace Ui
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <noggit/ui/minimap_widget.hpp>
|
||||
#include <noggit/ui/UidFixWindow.hpp>
|
||||
#include <noggit/uid_storage.hpp>
|
||||
#include <noggit/ui/tools/MapCreationWizard/Ui/MapCreationWizard.hpp>
|
||||
#include <noggit/ui/FontAwesome.hpp>
|
||||
#include <noggit/ui/FramelessWindow.hpp>
|
||||
#include <noggit/ui/tools/UiCommon/StackedWidget.hpp>
|
||||
@@ -20,6 +19,7 @@
|
||||
#include <noggit/ui/windows/noggitWindow/components/BuildMapListComponent.hpp>
|
||||
#include <noggit/application/Utils.hpp>
|
||||
#include <noggit/application/NoggitApplication.hpp>
|
||||
#include <noggit/ui/tools/MapCreationWizard/Ui/MapCreationWizard.hpp>
|
||||
#include <BlizzardDatabase.h>
|
||||
#include <QtGui/QCloseEvent>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
@@ -141,6 +141,8 @@ namespace Noggit::Ui::Windows
|
||||
|
||||
_buildMapListComponent = std::make_unique<Component::BuildMapListComponent>();
|
||||
|
||||
_map_creation_wizard = new Noggit::Ui::Tools::MapCreationWizard::Ui::MapCreationWizard(_project, this);
|
||||
|
||||
buildMenu();
|
||||
}
|
||||
|
||||
@@ -486,8 +488,6 @@ namespace Noggit::Ui::Windows
|
||||
_right_side->addTab(minimap_holder, "Enter map");
|
||||
minimap_holder->setAccessibleName("main_menu_minimap_holder");
|
||||
|
||||
_map_creation_wizard = new Noggit::Ui::Tools::MapCreationWizard::Ui::MapCreationWizard(_project, this);
|
||||
|
||||
_map_wizard_connection = connect(_map_creation_wizard,
|
||||
&Noggit::Ui::Tools::MapCreationWizard::Ui::MapCreationWizard::map_dbc_updated,
|
||||
[this](int map_id = -1)
|
||||
@@ -560,6 +560,12 @@ namespace Noggit::Ui::Windows
|
||||
_buildMapListComponent->buildMapList(this);
|
||||
}
|
||||
|
||||
World* NoggitWindow::getWorld()
|
||||
{
|
||||
return _map_creation_wizard->getWorld();
|
||||
}
|
||||
|
||||
|
||||
void NoggitWindow::promptExit(QCloseEvent* event)
|
||||
{
|
||||
emit exitPromptOpened();
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <noggit/World.h>
|
||||
#include <noggit/MapView.h>
|
||||
#include <noggit/ui/UidFixWindow.hpp>
|
||||
#include <noggit/ui/tools/MapCreationWizard/Ui/MapCreationWizard.hpp>
|
||||
#include <noggit/application/Configuration/NoggitApplicationConfiguration.hpp>
|
||||
#include <noggit/ui/windows/noggitWindow/components/BuildMapListComponent.hpp>
|
||||
#include <noggit/project/ApplicationProject.h>
|
||||
@@ -18,6 +17,11 @@
|
||||
|
||||
class StackedWidget;
|
||||
|
||||
namespace Noggit::Ui::Tools::MapCreationWizard::Ui
|
||||
{
|
||||
class MapCreationWizard;
|
||||
}
|
||||
|
||||
namespace Noggit::Ui
|
||||
{
|
||||
class minimap_widget;
|
||||
@@ -67,7 +71,7 @@ namespace Noggit::Ui::Windows
|
||||
void handleEventMapListContextMenuPinMap(int mapId, std::string MapName);
|
||||
void handleEventMapListContextMenuUnpinMap(int mapId);
|
||||
|
||||
World* getWorld() { return _map_creation_wizard->getWorld(); };
|
||||
World* getWorld();
|
||||
|
||||
void loadMap (int map_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user