mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-20 01:12:09 +00:00
NEW: support to edit bed stl and texture for third-party printers
Jira:STUDIO-4209
some codes are referenced form PrusaSlicer,thanks enricoturri1966 for the original commit
commit cf380fb456
Author: enricoturri1966 <enricoturri@seznam.cz>
Date: Tue Sep 21 13:51:57 2021 +0200
Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Out of bed detection for circular printbeds
...
Change-Id: I1b1e2ff045286566d4fb9f2d8ad4faa1f135f60c
(cherry picked from commit 284bca9f1f4cdb9eb405e8205cd50666a2b0b2a0)
This commit is contained in:
@@ -131,7 +131,9 @@ void Field::PostInitialize()
|
||||
// For the mode, when settings are in non-modal dialog, neither dialog nor tabpanel doesn't receive wxEVT_KEY_UP event, when some field is selected.
|
||||
// So, like a workaround check wxEVT_KEY_UP event for the Filed and switch between tabs if Ctrl+(1-4) was pressed
|
||||
if (getWindow()) {
|
||||
if (m_opt.readonly) getWindow()->Disable();
|
||||
if (m_opt.readonly) {
|
||||
this->disable();
|
||||
}
|
||||
getWindow()->Bind(wxEVT_KEY_UP, [](wxKeyEvent& evt) {
|
||||
if ((evt.GetModifiers() & wxMOD_CONTROL) != 0) {
|
||||
int tab_id = -1;
|
||||
@@ -424,6 +426,12 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (m_opt_id == "printable_area") {
|
||||
if (0 <= x && x <= 1000 && 0 <= y && y <= 1000) {
|
||||
out_values.push_back(Vec2d(x, y));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (0 < x && x < 1000 && 0 < y && y < 1000) {
|
||||
out_values.push_back(Vec2d(x, y));
|
||||
|
||||
Reference in New Issue
Block a user