GUI::show_error() is now generalized for std::string and const char*

Fixed return type of std::string translate_utf8() with context
(incorrectly returned wxString, should return std::string).
Fixed double translation of BackgroundSlicingProcess::validate() in Plater.
This commit is contained in:
bubnikv 2020-02-21 13:38:06 +01:00
parent 0486e412f4
commit a7ffd2a6fe
8 changed files with 19 additions and 12 deletions

View file

@ -229,10 +229,15 @@ void show_error(wxWindow* parent, const wxString& message)
msg.ShowModal();
}
void show_error(wxWindow* parent, const char* message)
{
show_error(parent, wxString::FromUTF8(message));
}
void show_error_id(int id, const std::string& message)
{
auto *parent = id != 0 ? wxWindow::FindWindowById(id) : nullptr;
show_error(parent, from_u8(message));
show_error(parent, message);
}
void show_info(wxWindow* parent, const wxString& message, const wxString& title)