mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
Revert "Fix Compile Warnings (#5963)"
This reverts commit b83e16dbdd
.
Found regressions like auto orientation didn't work anymore after this change, revert it
This commit is contained in:
parent
0286c36f42
commit
7082e945b1
184 changed files with 1091 additions and 461 deletions
|
@ -301,6 +301,7 @@ public:
|
|||
memDC.SetTextForeground(StateColor::darkModeColorFor(wxColour(144, 144, 144)));
|
||||
int width = bitmap.GetWidth();
|
||||
int text_height = memDC.GetTextExtent(text).GetHeight();
|
||||
int text_width = memDC.GetTextExtent(text).GetWidth();
|
||||
wxRect text_rect(wxPoint(0, m_action_line_y_position), wxPoint(width, m_action_line_y_position + text_height));
|
||||
memDC.DrawLabel(text, text_rect, wxALIGN_CENTER);
|
||||
|
||||
|
@ -962,7 +963,7 @@ void GUI_App::post_init()
|
|||
// Neither wxShowEvent nor wxWindowCreateEvent work reliably.
|
||||
if (this->preset_updater) { // G-Code Viewer does not initialize preset_updater.
|
||||
CallAfter([this] {
|
||||
this->config_wizard_startup();
|
||||
bool cw_showed = this->config_wizard_startup();
|
||||
|
||||
std::string http_url = get_http_url(app_config->get_country_code());
|
||||
std::string language = GUI::into_u8(current_language_code());
|
||||
|
@ -1025,7 +1026,8 @@ void GUI_App::post_init()
|
|||
try {
|
||||
std::time_t lw_t = boost::filesystem::last_write_time(temp_path) ;
|
||||
files_vec.push_back({ lw_t, temp_path.filename().string() });
|
||||
} catch (std::exception&) {}
|
||||
} catch (const std::exception &ex) {
|
||||
}
|
||||
}
|
||||
std::sort(files_vec.begin(), files_vec.end(), [](
|
||||
std::pair<time_t, std::string> &a, std::pair<time_t, std::string> &b) {
|
||||
|
@ -1315,6 +1317,7 @@ int GUI_App::download_plugin(std::string name, std::string package_name, Install
|
|||
.on_complete([&pro_fn, tmp_path, target_file_path](std::string body, unsigned status) {
|
||||
BOOST_LOG_TRIVIAL(info) << "[download_plugin 2] completed";
|
||||
bool cancel = false;
|
||||
int percent = 0;
|
||||
fs::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc);
|
||||
file.write(body.c_str(), body.size());
|
||||
file.close();
|
||||
|
@ -1924,13 +1927,8 @@ void GUI_App::init_app_config()
|
|||
boost::filesystem::create_directory(data_dir_path);
|
||||
}
|
||||
|
||||
// Change current directory of application
|
||||
auto path = encode_path((Slic3r::data_dir() + "/log").c_str());
|
||||
#ifdef _WIN32
|
||||
_chdir(path.c_str());
|
||||
#else
|
||||
chdir(path.c_str());
|
||||
#endif
|
||||
// Change current dirtory of application
|
||||
chdir(encode_path((Slic3r::data_dir() + "/log").c_str()).c_str());
|
||||
} else {
|
||||
m_datadir_redefined = true;
|
||||
}
|
||||
|
@ -3367,7 +3365,7 @@ if (res) {
|
|||
mainframe->refresh_plugin_tips();
|
||||
// BBS: remove SLA related message
|
||||
}
|
||||
} catch (std::exception&) {
|
||||
} catch (std::exception &e) {
|
||||
// wxMessageBox(e.what(), "", MB_OK);
|
||||
}
|
||||
}
|
||||
|
@ -3381,7 +3379,9 @@ void GUI_App::ShowDownNetPluginDlg() {
|
|||
return;
|
||||
DownloadProgressDialog dlg(_L("Downloading Bambu Network Plug-in"));
|
||||
dlg.ShowModal();
|
||||
} catch (std::exception&) {}
|
||||
} catch (std::exception &e) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
void GUI_App::ShowUserLogin(bool show)
|
||||
|
@ -3396,7 +3396,9 @@ void GUI_App::ShowUserLogin(bool show)
|
|||
login_dlg = new ZUserLogin();
|
||||
}
|
||||
login_dlg->ShowModal();
|
||||
} catch (std::exception&) {}
|
||||
} catch (std::exception &e) {
|
||||
;
|
||||
}
|
||||
} else {
|
||||
if (login_dlg)
|
||||
login_dlg->EndModal(wxID_OK);
|
||||
|
@ -3416,7 +3418,7 @@ void GUI_App::ShowOnlyFilament() {
|
|||
|
||||
// BBS: remove SLA related message
|
||||
}
|
||||
} catch (std::exception&) {
|
||||
} catch (std::exception &e) {
|
||||
// wxMessageBox(e.what(), "", MB_OK);
|
||||
}
|
||||
}
|
||||
|
@ -3828,10 +3830,10 @@ std::string GUI_App::handle_web_request(std::string cmd)
|
|||
auto keyCode = key_event_node.get<int>("key");
|
||||
auto ctrlKey = key_event_node.get<bool>("ctrl");
|
||||
auto shiftKey = key_event_node.get<bool>("shift");
|
||||
auto cmdKey = key_event_node.get<bool>("cmd");
|
||||
|
||||
wxKeyEvent e(wxEVT_CHAR_HOOK);
|
||||
#ifdef __APPLE__
|
||||
auto cmdKey = key_event_node.get<bool>("cmd");
|
||||
e.SetControlDown(cmdKey);
|
||||
e.SetRawControlDown(ctrlKey);
|
||||
#else
|
||||
|
@ -4787,6 +4789,8 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
|||
});
|
||||
}
|
||||
|
||||
unsigned int http_code = 200;
|
||||
|
||||
/* get list witch need to be deleted*/
|
||||
std::vector<string> delete_cache_presets = get_delete_cache_presets_lock();
|
||||
for (auto it = delete_cache_presets.begin(); it != delete_cache_presets.end();) {
|
||||
|
@ -5470,7 +5474,7 @@ void GUI_App::show_ip_address_enter_dialog_handler(wxCommandEvent& evt)
|
|||
|
||||
void GUI_App::open_preferences(size_t open_on_tab, const std::string& highlight_option)
|
||||
{
|
||||
// bool app_layout_changed = false;
|
||||
bool app_layout_changed = false;
|
||||
{
|
||||
// the dialog needs to be destroyed before the call to recreate_GUI()
|
||||
// or sometimes the application crashes into wxDialogBase() destructor
|
||||
|
@ -6503,6 +6507,8 @@ static bool del_win_registry(HKEY hkeyHive, const wchar_t *pszVar, const wchar_t
|
|||
return false;
|
||||
|
||||
if (!bDidntExist) {
|
||||
DWORD dwDisposition;
|
||||
HKEY hkey;
|
||||
iRC = ::RegDeleteKeyExW(hkeyHive, pszVar, KEY_ALL_ACCESS, 0);
|
||||
if (iRC == ERROR_SUCCESS) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue