mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-04 18:58:00 -05:00
Add a Run Script dialog for running MCP scripts in the app
This commit is contained in:
1 parent
2496ee0908
commit
c9db694c32
46 files changed
+3692
-178
No files matched your search
@@ -85,6 +85,7 @@
|
||||
#include "3DScene.hpp"
|
||||
#include "ParamsDialog.hpp"
|
||||
#include "PrintHostDialogs.hpp"
|
||||
#include "ScriptRunnerDialog.hpp"
|
||||
#include "libslic3r_version.h"
|
||||
#include "wxExtensions.hpp"
|
||||
#include "GUI_ObjectList.hpp"
|
||||
@@ -3201,6 +3202,9 @@ void MainFrame::init_menubar_as_editor()
|
||||
|
||||
append_submenu(fileMenu, export_menu, wxID_ANY, _L("Export"), "");
|
||||
|
||||
append_menu_item(fileMenu, wxID_ANY, _L("Run Script") + dots, _L("Open or paste a script and run its steps"),
|
||||
[this](wxCommandEvent&) { show_script_runner(); }, "", nullptr, []() { return true; }, this);
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
#ifndef __APPLE__
|
||||
@@ -4029,6 +4033,14 @@ struct ConfigsOverwriteConfirmDialog : MessageDialog
|
||||
}
|
||||
};
|
||||
|
||||
void MainFrame::show_script_runner()
|
||||
{
|
||||
if (!m_script_runner)
|
||||
m_script_runner = new ScriptRunnerDialog(this);
|
||||
m_script_runner->Show();
|
||||
m_script_runner->Raise();
|
||||
}
|
||||
|
||||
void MainFrame::export_config()
|
||||
{
|
||||
ExportConfigsDialog export_configs_dlg(nullptr);
|
||||
|
||||
Reference in new issue
Block a user