mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
remove: "FIX:fixed some issues with sending prints"
This reverts commit d1036a86604da5d5f72bb9531618d959036caf42. Change-Id: I17ad13d477ece20638c9c1a2f72aea7401d335ca
This commit is contained in:
parent
4a52147443
commit
9abe0ad9f6
7 changed files with 15 additions and 96 deletions
|
@ -13,7 +13,6 @@
|
|||
#include "Widgets/StaticBox.hpp"
|
||||
#include "Widgets/WebView.hpp"
|
||||
|
||||
#include <wx/regex.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/dcgraph.h>
|
||||
|
@ -421,36 +420,16 @@ void SecondaryCheckDialog::update_text(wxString text)
|
|||
text = format_text(m_staticText_release_note, text, FromDIP(240));
|
||||
|
||||
m_staticText_release_note->SetLabelText(text);
|
||||
if (is_english_text(text)) m_staticText_release_note->Wrap(FromDIP(240));
|
||||
m_staticText_release_note->Wrap(FromDIP(240));
|
||||
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALIGN_CENTER, 5);
|
||||
m_vebview_release_note->SetSizer(sizer_text_release_note);
|
||||
m_vebview_release_note->Layout();
|
||||
}
|
||||
|
||||
bool SecondaryCheckDialog::is_english_text(wxString str)
|
||||
{
|
||||
std::regex reg("^[0-9a-zA-Z]+$");
|
||||
std::smatch matchResult;
|
||||
|
||||
std::string pattern_Special = "{}[]<>~!@#$%^&*(),.?/ :";
|
||||
for (auto i = 0; i < str.Length(); i++) {
|
||||
std::string regex_str = wxString(str[i]).ToStdString();
|
||||
if(std::regex_match(regex_str, matchResult, reg)){
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
int result = pattern_Special.find(regex_str.c_str());
|
||||
if (result < 0 || result > pattern_Special.length()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
//Fit();
|
||||
}
|
||||
|
||||
wxString SecondaryCheckDialog::format_text(wxStaticText* st, wxString str, int warp)
|
||||
{
|
||||
if (is_english_text(str)) return str;
|
||||
if (wxGetApp().app_config->get("language") != "zh_CN") { return str; }
|
||||
|
||||
wxString out_txt = str;
|
||||
wxString count_txt = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue