mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
ENH: hide some functions which are not ready on U2 version
Change-Id: I6ff7f98d55d9734938b65aaa72727320dd3c5f6e
This commit is contained in:
parent
efb7106ecc
commit
030efb339a
6 changed files with 35 additions and 7 deletions
|
@ -257,17 +257,23 @@ void CameraPopup::check_func_supported()
|
|||
|
||||
allow_alter_resolution = (m_obj->is_function_supported(PrinterFunction::FUNC_ALTER_RESOLUTION) && m_obj->has_ipcam);
|
||||
|
||||
//check u2 version
|
||||
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev) return;
|
||||
MachineObject* obj = dev->get_selected_machine();
|
||||
if (!obj) return;
|
||||
|
||||
//resolution supported
|
||||
std::vector<std::string> resolution_supported = m_obj->get_resolution_supported();
|
||||
auto support_count = resolution_supported.size();
|
||||
for (int i = 0; i < (int)RESOLUTION_OPTIONS_NUM; ++i){
|
||||
auto curr_res = to_resolution_msg_string(CameraResolution(i));
|
||||
std::vector <std::string> ::iterator it = std::find(resolution_supported.begin(), resolution_supported.end(), curr_res);
|
||||
if ((it == resolution_supported.end())||(support_count <= 1))
|
||||
if ((it == resolution_supported.end())||(support_count <= 1) || !obj->is_support_1080dpi)
|
||||
m_resolution_options[i] -> Hide();
|
||||
}
|
||||
//hide resolution if there is only one choice
|
||||
if (support_count <= 1) {
|
||||
if (support_count <= 1 || !obj->is_support_1080dpi) {
|
||||
m_text_resolution->Hide();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue