ENH: [STUDIO-3911] load as model file when drag to home page
Change-Id: I1d8986ca4984fea418371f253a48a9593bb9b1af (cherry picked from commit 685edaa145cd4b4ce4afce00ae81d78305f84e84)
This commit is contained in:
parent
dee1c04f28
commit
d30470d603
|
@ -528,6 +528,12 @@ void WebViewPanel::OnNavigationRequest(wxWebViewEvent& evt)
|
||||||
const wxString &url = evt.GetURL();
|
const wxString &url = evt.GetURL();
|
||||||
if (url.StartsWith("File://") || url.StartsWith("file://")) {
|
if (url.StartsWith("File://") || url.StartsWith("file://")) {
|
||||||
if (!url.Contains("/web/homepage/index.html")) {
|
if (!url.Contains("/web/homepage/index.html")) {
|
||||||
|
auto file = wxURL::Unescape(wxURL(url).GetPath());
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (file.StartsWith('/'))
|
||||||
|
file = file.Mid(1);
|
||||||
|
#endif
|
||||||
|
wxGetApp().plater()->load_files(wxArrayString{1, &file});
|
||||||
evt.Veto();
|
evt.Veto();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue