diff --git a/src/slic3r/GUI/Widgets/ComboBox.cpp b/src/slic3r/GUI/Widgets/ComboBox.cpp index f696fc7945..4df76e322a 100644 --- a/src/slic3r/GUI/Widgets/ComboBox.cpp +++ b/src/slic3r/GUI/Widgets/ComboBox.cpp @@ -202,6 +202,8 @@ void ComboBox::DoClear() datas.clear(); types.clear(); drop.Invalidate(true); + if (GetTextCtrl()->IsShown() || text_off) + GetTextCtrl()->Clear(); } void ComboBox::DoDeleteOneItem(unsigned int pos) diff --git a/src/slic3r/GUI/WifiConfigDialog.cpp b/src/slic3r/GUI/WifiConfigDialog.cpp index 00439b5f9d..e6126e5147 100644 --- a/src/slic3r/GUI/WifiConfigDialog.cpp +++ b/src/slic3r/GUI/WifiConfigDialog.cpp @@ -45,7 +45,7 @@ WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, Rem auto* ssid_sizer = new wxBoxSizer(wxHORIZONTAL); // TRN SSID of WiFi network. It is a standard abbreviation which should probably not change in most languages. wxStaticText* ssid_label = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr("%1%:", _L("SSID"))); - m_ssid_combo = new ::ComboBox(panel, wxID_ANY); + m_ssid_combo = new ::ComboBox(panel, wxID_ANY, wxString(""), wxDefaultPosition, wxDefaultSize, 0, nullptr, DD_NO_CHECK_ICON); #if __APPLE__ m_ssid_combo->SetToolTip(_L("On some versions of MacOS, this only loads SSID of connected network.")); #endif // __APPLE__ @@ -60,13 +60,15 @@ WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, Rem // TRN Password of WiFi network. wxStaticText* password_label = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr("%1%:", _L("Password"))); m_pass_textctrl = new ::TextInput(panel, "", "", "", wxDefaultPosition, wxDefaultSize); - pass_sizer->Add(m_pass_textctrl, 1, wxALIGN_CENTER_VERTICAL, 10); #if __APPLE__ + pass_sizer->Add(m_pass_textctrl, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10); m_pass_button_id = NewControlId(); // TRN Text of button to retrieve password from keychain in Wifi Config dialog. Only on Mac. wxButton* pass_button = new wxButton(panel, m_pass_button_id, _(L("Retrieve"))); pass_sizer->Add(pass_button, 0); pass_button->Bind(wxEVT_BUTTON, &WifiConfigDialog::on_retrieve_password, this); +#else + pass_sizer->Add(m_pass_textctrl, 1, wxALIGN_CENTER_VERTICAL, 10); #endif // __APPLE__ // show password if current ssid was selected already fill_password(); @@ -74,7 +76,7 @@ WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, Rem auto* drive_sizer = new wxBoxSizer(wxHORIZONTAL); // TRN description of Combo Box with path to USB drive. wxStaticText* drive_label = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr("%1%:", _L("Drive"))); - m_drive_combo = new ::ComboBox(panel, wxID_ANY); + m_drive_combo = new ::ComboBox(panel, wxID_ANY, wxString(""), wxDefaultPosition, wxDefaultSize, 0, nullptr, DD_NO_CHECK_ICON); rescan_drives(preffered_drive); m_drive_button_id = NewControlId(); // TRN Text of button to rescan connect usb drives in Wifi Config dialog. @@ -166,7 +168,6 @@ void WifiConfigDialog::rescan_drives(const wxString& preffered_drive) { assert(m_drive_combo && m_removable_manager); m_drive_combo->Clear(); - m_drive_combo->GetTextCtrl()->Clear(); std::vector ddata = m_removable_manager->get_drive_list(); for (const auto& data : ddata) { wxString item = boost::nowide::widen(data.path); @@ -191,7 +192,6 @@ void WifiConfigDialog::rescan_networks(bool select) std::string current = m_wifi_scanner->get_current_ssid(); const auto& map = m_wifi_scanner->get_map(); m_ssid_combo->Clear(); - m_ssid_combo->GetTextCtrl()->Clear(); for (const auto pair : map) { m_ssid_combo->Append(pair.first); // select ssid of current network (if connected)