mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 05:17:19 +00:00
Make sure mouse position is updated before hit test (#14139)
This commit is contained in:
@@ -807,6 +807,8 @@ wxAuiToolBarItem* BBLTopbar::FindToolByCurrentPosition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
#include <windowsx.h>
|
||||||
|
|
||||||
WXLRESULT CenteredTitle::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
WXLRESULT CenteredTitle::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (nMsg) {
|
switch (nMsg) {
|
||||||
@@ -823,6 +825,8 @@ WXLRESULT BBLTopbar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam
|
|||||||
{
|
{
|
||||||
switch (nMsg) {
|
switch (nMsg) {
|
||||||
case WM_NCHITTEST: {
|
case WM_NCHITTEST: {
|
||||||
|
m_last_mouse_position = ScreenToClient({GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)});
|
||||||
|
|
||||||
wxAuiToolBarItem* item = this->FindToolByCurrentPosition();
|
wxAuiToolBarItem* item = this->FindToolByCurrentPosition();
|
||||||
if (item != NULL && item->GetWindow() != m_title_ctrl) {
|
if (item != NULL && item->GetWindow() != m_title_ctrl) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user