mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 15:40:39 +08:00
Merge branch 'master' into fs_svg_SPE-1517
This commit is contained in:
commit
15931c2ef4
@ -1,13 +1,13 @@
|
|||||||
///|/ Copyright (c) Prusa Research 2018 - 2023 Enrico Turri @enricoturri1966, Oleksandra Iushchenko @YuSanka, Tomáš Mészáros @tamasmeszaros, Lukáš Matěna @lukasmatena, Vojtěch Bubník @bubnikv, David Kocík @kocikdav, Filip Sykala @Jony01, Lukáš Hejl @hejllukas, Vojtěch Král @vojtechkral
|
///|/ Copyright (c) Prusa Research 2018 - 2023 Enrico Turri @enricoturri1966, Oleksandra Iushchenko @YuSanka, Tomáš Mészáros @tamasmeszaros, Lukáš Matěna @lukasmatena, Vojtěch Bubník @bubnikv, David Kocík @kocikdav, Filip Sykala @Jony01, Lukáš Hejl @hejllukas, Vojtěch Král @vojtechkral
|
||||||
///|/ Copyright (c) BambuStudio 2023 manch1n @manch1n
|
///|/ Copyright (c) BambuStudio 2023 manch1n @manch1n
|
||||||
///|/ Copyright (c) SuperSlicer 2023 Remi Durand @supermerill
|
///|/ Copyright (c) SuperSlicer 2023 Remi Durand @supermerill
|
||||||
///|/ Copyright (c) 2020 Benjamin Greiner
|
///|/ Copyright (c) 2020 Benjamin Greiner
|
||||||
///|/ Copyright (c) 2019 John Drake @foxox
|
///|/ Copyright (c) 2019 John Drake @foxox
|
||||||
///|/ Copyright (c) 2019 BeldrothTheGold @BeldrothTheGold
|
///|/ Copyright (c) 2019 BeldrothTheGold @BeldrothTheGold
|
||||||
///|/ Copyright (c) 2019 Thomas Moore
|
///|/ Copyright (c) 2019 Thomas Moore
|
||||||
///|/
|
///|/
|
||||||
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||||
///|/
|
///|/
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "GLCanvas3D.hpp"
|
#include "GLCanvas3D.hpp"
|
||||||
|
|
||||||
@ -3617,20 +3617,19 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
|
|
||||||
//#if defined(__WXMSW__) || defined(__linux__)
|
//#if defined(__WXMSW__) || defined(__linux__)
|
||||||
// // On Windows and Linux needs focus in order to catch key events
|
// // On Windows and Linux needs focus in order to catch key events
|
||||||
// Set focus in order to remove it from object list
|
|
||||||
if (m_canvas != nullptr) {
|
if (m_canvas != nullptr) {
|
||||||
// Only set focus, if the top level window of this canvas is active
|
|
||||||
// and ObjectList has a focus
|
// Set focus in order to remove it from sidebar but not from TextControl (in ManipulationPanel f.e.)
|
||||||
auto p = dynamic_cast<wxWindow*>(evt.GetEventObject());
|
if (!m_canvas->HasFocus()) {
|
||||||
while (p->GetParent())
|
wxTopLevelWindow* tlw = find_toplevel_parent(m_canvas);
|
||||||
p = p->GetParent();
|
// Only set focus, if the top level window of this canvas is active
|
||||||
#ifdef __WIN32__
|
if (tlw->IsActive()) {
|
||||||
wxWindow* const obj_list = wxGetApp().obj_list()->GetMainWindow();
|
auto* text_ctrl = dynamic_cast<wxTextCtrl*>(tlw->FindFocus());
|
||||||
#else
|
if (text_ctrl == nullptr)
|
||||||
wxWindow* const obj_list = wxGetApp().obj_list();
|
m_canvas->SetFocus();
|
||||||
#endif
|
}
|
||||||
if (obj_list == p->FindFocus())
|
}
|
||||||
m_canvas->SetFocus();
|
|
||||||
m_mouse.position = pos.cast<double>();
|
m_mouse.position = pos.cast<double>();
|
||||||
m_tooltip_enabled = false;
|
m_tooltip_enabled = false;
|
||||||
// 1) forces a frame render to ensure that m_hover_volume_idxs is updated even when the user right clicks while
|
// 1) forces a frame render to ensure that m_hover_volume_idxs is updated even when the user right clicks while
|
||||||
|
Loading…
x
Reference in New Issue
Block a user