Skip to content

Commit

Permalink
Missformatted URL if no additional GET Parameter has been supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviator-Coding authored and supermerill committed Dec 29, 2023
1 parent a7e5886 commit 131679c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/slic3r/GUI/GUI_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,12 @@ wxString GUI_App::current_language_code_safe() const

void GUI_App::open_web_page_localized(const std::string &http_address)
{
open_browser_with_warning_dialog(http_address + "&lng=" + this->current_language_code_safe(), nullptr, false);
wxString lng_param = wxString("lng=") + this->current_language_code_safe();

// Check if http_address already contains a query parameter
size_t query_pos = http_address.find('?');
open_browser_with_warning_dialog(wxString(http_address) + wxString(query_pos == std::string::npos ? "?" : "&") + lng_param,
nullptr, false);
}

// If we are switching from the FFF-preset to the SLA, we should to control the printed objects if they have a part(s).
Expand Down

0 comments on commit 131679c

Please sign in to comment.