mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-30 01:54:40 +08:00
Fixed build when ENABLE_GCODE_VIEWER is disabled
This commit is contained in:
parent
f5f105d4b0
commit
b9c0c15104
@ -12,9 +12,7 @@
|
|||||||
#include "I18N.hpp"
|
#include "I18N.hpp"
|
||||||
#include "ExtruderSequenceDialog.hpp"
|
#include "ExtruderSequenceDialog.hpp"
|
||||||
#include "libslic3r/Print.hpp"
|
#include "libslic3r/Print.hpp"
|
||||||
#if ENABLE_GCODE_VIEWER
|
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
|
||||||
|
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
@ -477,8 +475,10 @@ void Control::draw_action_icon(wxDC& dc, const wxPoint pt_beg, const wxPoint pt_
|
|||||||
{
|
{
|
||||||
const int tick = m_selection == ssLower ? m_lower_value : m_higher_value;
|
const int tick = m_selection == ssLower ? m_lower_value : m_higher_value;
|
||||||
|
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
if (!m_enable_action_icon)
|
if (!m_enable_action_icon)
|
||||||
return;
|
return;
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
|
||||||
// suppress add tick on first layer
|
// suppress add tick on first layer
|
||||||
if (tick == 0)
|
if (tick == 0)
|
||||||
|
@ -717,6 +717,7 @@ void GUI_App::init_app_config()
|
|||||||
std::string error = app_config->load();
|
std::string error = app_config->load();
|
||||||
if (!error.empty()) {
|
if (!error.empty()) {
|
||||||
// Error while parsing config file. We'll customize the error message and rethrow to be displayed.
|
// Error while parsing config file. We'll customize the error message and rethrow to be displayed.
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
if (is_editor()) {
|
if (is_editor()) {
|
||||||
throw Slic3r::RuntimeError(
|
throw Slic3r::RuntimeError(
|
||||||
_u8L("Error parsing PrusaSlicer config file, it is probably corrupted. "
|
_u8L("Error parsing PrusaSlicer config file, it is probably corrupted. "
|
||||||
@ -724,11 +725,14 @@ void GUI_App::init_app_config()
|
|||||||
"\n\n" + app_config->config_path() + "\n\n" + error);
|
"\n\n" + app_config->config_path() + "\n\n" + error);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
throw Slic3r::RuntimeError(
|
throw Slic3r::RuntimeError(
|
||||||
_u8L("Error parsing PrusaGCodeViewer config file, it is probably corrupted. "
|
_u8L("Error parsing PrusaGCodeViewer config file, it is probably corrupted. "
|
||||||
"Try to manually delete the file to recover from the error.") +
|
"Try to manually delete the file to recover from the error.") +
|
||||||
"\n\n" + app_config->config_path() + "\n\n" + error);
|
"\n\n" + app_config->config_path() + "\n\n" + error);
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
}
|
}
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user