mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-19 06:40:42 +00:00
Merge branch 'crash-at-exit'
This commit is contained in:
commit
cb81ec053a
@ -102,6 +102,7 @@ add_subdirectory(ui)
|
||||
|
||||
if(ENABLE_SCRIPTING)
|
||||
add_subdirectory(script)
|
||||
add_definitions(-DENABLE_SCRIPTING)
|
||||
endif()
|
||||
|
||||
if(ENABLE_UPDATER)
|
||||
|
@ -60,10 +60,6 @@ if(WITH_WEBP_SUPPORT)
|
||||
add_definitions(-DASEPRITE_WITH_WEBP_SUPPORT)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SCRIPTING)
|
||||
add_definitions(-DENABLE_SCRIPTING)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# app-lib target
|
||||
|
||||
@ -267,7 +263,6 @@ add_library(app-lib
|
||||
commands/cmd_reselect_mask.cpp
|
||||
commands/cmd_reverse_frames.cpp
|
||||
commands/cmd_rotate.cpp
|
||||
commands/cmd_run_script.cpp
|
||||
commands/cmd_save_file.cpp
|
||||
commands/cmd_save_mask.cpp
|
||||
commands/cmd_save_palette.cpp
|
||||
|
@ -8,6 +8,10 @@
|
||||
#define APP_SCRIPTING_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#ifndef ENABLE_SCRIPTING
|
||||
#error ENABLE_SCRIPTING must be defined
|
||||
#endif
|
||||
|
||||
#include "doc/object_id.h"
|
||||
#include "script/engine.h"
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
#define APP_SHELL_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#ifndef ENABLE_SCRIPTING
|
||||
#error ENABLE_SCRIPTING must be defined
|
||||
#endif
|
||||
|
||||
namespace script {
|
||||
class Engine;
|
||||
}
|
||||
|
@ -8,6 +8,10 @@
|
||||
#define APP_UI_DEVCONSOLE_VIEW_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#ifndef ENABLE_SCRIPTING
|
||||
#error ENABLE_SCRIPTING must be defined
|
||||
#endif
|
||||
|
||||
#include "app/script/app_scripting.h"
|
||||
#include "app/ui/tabs.h"
|
||||
#include "app/ui/workspace_view.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "app/pref/preferences.h"
|
||||
#include "app/ui/color_bar.h"
|
||||
#include "app/ui/context_bar.h"
|
||||
#include "app/ui/devconsole_view.h"
|
||||
#include "app/ui/document_view.h"
|
||||
#include "app/ui/editor/editor.h"
|
||||
#include "app/ui/editor/editor_view.h"
|
||||
@ -43,6 +42,10 @@
|
||||
#include "ui/system.h"
|
||||
#include "ui/view.h"
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
#include "app/ui/devconsole_view.h"
|
||||
#endif
|
||||
|
||||
namespace app {
|
||||
|
||||
using namespace ui;
|
||||
@ -90,8 +93,10 @@ public:
|
||||
MainWindow::MainWindow()
|
||||
: m_mode(NormalMode)
|
||||
, m_homeView(nullptr)
|
||||
, m_devConsoleView(nullptr)
|
||||
, m_scalePanic(nullptr)
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
, m_devConsoleView(nullptr)
|
||||
#endif
|
||||
{
|
||||
// Load all menus by first time.
|
||||
AppMenus::instance()->reload();
|
||||
@ -154,11 +159,14 @@ MainWindow::~MainWindow()
|
||||
{
|
||||
delete m_scalePanic;
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
if (m_devConsoleView) {
|
||||
if (m_devConsoleView->parent())
|
||||
m_workspace->removeView(m_devConsoleView);
|
||||
delete m_devConsoleView;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_homeView) {
|
||||
if (m_homeView->parent())
|
||||
m_workspace->removeView(m_homeView);
|
||||
|
@ -114,9 +114,11 @@ namespace app {
|
||||
Workspace* m_workspace;
|
||||
PreviewEditorWindow* m_previewEditor;
|
||||
HomeView* m_homeView;
|
||||
DevConsoleView* m_devConsoleView;
|
||||
Notifications* m_notifications;
|
||||
INotificationDelegate* m_scalePanic;
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
DevConsoleView* m_devConsoleView;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user