mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 13:32:44 +00:00
fix: unit tests & unused variables
This commit is contained in:
@@ -81,7 +81,7 @@ CameraPopup::CameraPopup(wxWindow *parent)
|
|||||||
top_sizer->Add(m_text_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, FromDIP(5));
|
top_sizer->Add(m_text_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, FromDIP(5));
|
||||||
top_sizer->Add(m_switch_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, FromDIP(5));
|
top_sizer->Add(m_switch_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, FromDIP(5));
|
||||||
|
|
||||||
m_switch_liveview_retry->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) {
|
m_switch_liveview_retry->Bind(wxEVT_TOGGLEBUTTON, [](wxCommandEvent &e) {
|
||||||
wxGetApp().app_config->set("liveview", "auto_retry", e.IsChecked());
|
wxGetApp().app_config->set("liveview", "auto_retry", e.IsChecked());
|
||||||
e.Skip();
|
e.Skip();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1463,7 +1463,7 @@ wxBoxSizer *StatusBasePanel::create_monitoring_page()
|
|||||||
#if !BBL_RELEASE_TO_PUBLIC
|
#if !BBL_RELEASE_TO_PUBLIC
|
||||||
m_staticText_timelapse->Show();
|
m_staticText_timelapse->Show();
|
||||||
m_bmToggleBtn_timelapse->Show();
|
m_bmToggleBtn_timelapse->Show();
|
||||||
m_bmToggleBtn_timelapse->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) {
|
m_bmToggleBtn_timelapse->Bind(wxEVT_TOGGLEBUTTON, [](wxCommandEvent &e) {
|
||||||
if (e.IsChecked())
|
if (e.IsChecked())
|
||||||
wxGetApp().getAgent()->start_subscribe("tunnel");
|
wxGetApp().getAgent()->start_subscribe("tunnel");
|
||||||
else
|
else
|
||||||
|
|||||||
+13
-3
@@ -57,18 +57,28 @@ function(orcaslicer_copy_test_dlls)
|
|||||||
# into it). Copy them next to the executable and give it an $ORIGIN
|
# into it). Copy them next to the executable and give it an $ORIGIN
|
||||||
# rpath so the loader finds them when the tests run on the CI unit-test
|
# rpath so the loader finds them when the tests run on the CI unit-test
|
||||||
# runner, which only receives this build/tests tree.
|
# runner, which only receives this build/tests tree.
|
||||||
get_target_property(_linked_libs ${_TEST_NAME}_tests LINK_LIBRARIES)
|
#
|
||||||
|
# Optional first arg: the target to patch, for directories that define
|
||||||
|
# more than one test executable. Defaults to ${_TEST_NAME}_tests so
|
||||||
|
# existing single-executable callers don't need to pass it.
|
||||||
|
if (ARGC GREATER 0)
|
||||||
|
set(_target ${ARGV0})
|
||||||
|
else()
|
||||||
|
set(_target ${_TEST_NAME}_tests)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_target_property(_linked_libs ${_target} LINK_LIBRARIES)
|
||||||
if (NOT "libslic3r_gui" IN_LIST _linked_libs)
|
if (NOT "libslic3r_gui" IN_LIST _linked_libs)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(TARGET ${_TEST_NAME}_tests PROPERTY BUILD_RPATH "$ORIGIN")
|
set_property(TARGET ${_target} PROPERTY BUILD_RPATH "$ORIGIN")
|
||||||
set(_configs ${CMAKE_CONFIGURATION_TYPES})
|
set(_configs ${CMAKE_CONFIGURATION_TYPES})
|
||||||
if (NOT _configs)
|
if (NOT _configs)
|
||||||
set(_configs "${CMAKE_BUILD_TYPE}")
|
set(_configs "${CMAKE_BUILD_TYPE}")
|
||||||
endif()
|
endif()
|
||||||
foreach(_cfg IN LISTS _configs)
|
foreach(_cfg IN LISTS _configs)
|
||||||
orcaslicer_copy_sos(${_TEST_NAME}_tests "${_cfg}" "" _unused_sos)
|
orcaslicer_copy_sos(${_target} "${_cfg}" "" _unused_sos)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ endif ()
|
|||||||
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r_gui libslic3r pybind11::embed Catch2::Catch2WithMain)
|
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r_gui libslic3r pybind11::embed Catch2::Catch2WithMain)
|
||||||
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
|
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
|
||||||
|
|
||||||
orcaslicer_copy_test_dlls()
|
orcaslicer_copy_test_dlls(${_TEST_NAME}_tests)
|
||||||
|
|
||||||
orcaslicer_stage_test_python_runtime(${_TEST_NAME}_tests)
|
orcaslicer_stage_test_python_runtime(${_TEST_NAME}_tests)
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ set_property(TARGET printer_agent_plugin_tests PROPERTY FOLDER "tests")
|
|||||||
# beside the shared test output dir; serialize them so the copies can't race.
|
# beside the shared test output dir; serialize them so the copies can't race.
|
||||||
add_dependencies(printer_agent_plugin_tests ${_TEST_NAME}_tests)
|
add_dependencies(printer_agent_plugin_tests ${_TEST_NAME}_tests)
|
||||||
|
|
||||||
orcaslicer_copy_test_dlls()
|
orcaslicer_copy_test_dlls(printer_agent_plugin_tests)
|
||||||
|
|
||||||
orcaslicer_stage_test_python_runtime(printer_agent_plugin_tests)
|
orcaslicer_stage_test_python_runtime(printer_agent_plugin_tests)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user