mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-03 02:18:41 +03:00
Optimized and fixed some bugs
This commit is contained in:
@@ -7,8 +7,11 @@
|
||||
#include "libslic3r_version.h"
|
||||
#include "../Utils/Http.hpp"
|
||||
|
||||
#include <regex>
|
||||
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
#include <boost/chrono.hpp>
|
||||
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/toolbar.h>
|
||||
@@ -512,6 +515,17 @@ void WebViewPanel::SendRecentList(int images)
|
||||
|
||||
void WebViewPanel::SendDesignStaffpick(bool on)
|
||||
{
|
||||
//1.9.7.52
|
||||
static long long StaffPickMs = 0;
|
||||
|
||||
auto now = std::chrono::system_clock::now();
|
||||
long long TmpMs = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
|
||||
long long nInterval = TmpMs - StaffPickMs;
|
||||
if (nInterval < 500) return;
|
||||
StaffPickMs = TmpMs;
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Begin SendDesignStaffpick: " << nInterval;
|
||||
|
||||
try {
|
||||
if (on) {
|
||||
std::string sguide = wxGetApp().app_config->get("firstguide", "finish");
|
||||
@@ -1009,10 +1023,12 @@ void WebViewPanel::OnNewWindow(wxWebViewEvent& evt)
|
||||
if (wxGetApp().get_mode() == comDevelop)
|
||||
wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'" + flag);
|
||||
|
||||
//If we handle new window events then just load them in this window as we
|
||||
//are a single window browser
|
||||
if (m_tools_handle_new_window->IsChecked())
|
||||
m_browser->LoadURL(evt.GetURL());
|
||||
//1.9.7.52
|
||||
//If we handle new window events then just load them in local browser
|
||||
if (m_tools_handle_new_window->IsChecked())
|
||||
{
|
||||
wxLaunchDefaultBrowser(evt.GetURL());
|
||||
}
|
||||
|
||||
UpdateState();
|
||||
}
|
||||
@@ -1421,7 +1437,7 @@ void WebViewPanel::SwitchLeftMenu(std::string strMenu)
|
||||
|
||||
void WebViewPanel::OpenOneMakerlab(std::string url) {
|
||||
auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code());
|
||||
std::string LabUrl = (boost::format("%1%%2%") % host % url).str();
|
||||
std::string LabUrl = (boost::format("%1%%2%?from=qidistudio") % host % url).str();
|
||||
|
||||
wxString FinalUrl = LabUrl;
|
||||
NetworkAgent *agent = GUI::wxGetApp().getAgent();
|
||||
|
||||
Reference in New Issue
Block a user