mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: refine some ui logics with filament map
1. Optimize performance with pop up 2. Optimize display in dark mode jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ic0f72a42e791fb58b84e7a88d7a34ced3a9e8c38 (cherry picked from commit 481ebc4a4b9353d8c9ef9d6bf64cb0006364e839)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "FilamentGroupPopup.hpp"
|
||||
#include "FilamentMapDialog.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include "wx/dcgraph.h"
|
||||
@@ -264,10 +263,18 @@ void FilamentGroupPopup::tryPopup(bool connect_status)
|
||||
};
|
||||
|
||||
if (canPopup()) {
|
||||
m_connected = connect_status;
|
||||
Init();
|
||||
ResetTimer();
|
||||
PopupWindow::Popup();
|
||||
if (m_active) {
|
||||
if (m_connected != connect_status) { Init(); }
|
||||
m_connected = connect_status;
|
||||
ResetTimer();
|
||||
}
|
||||
else {
|
||||
m_connected = connect_status;
|
||||
m_active = true;
|
||||
Init();
|
||||
ResetTimer();
|
||||
PopupWindow::Popup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,6 +318,12 @@ void FilamentGroupPopup::OnRemindBtn(wxCommandEvent &event)
|
||||
|
||||
void FilamentGroupPopup::OnTimer(wxTimerEvent &event) { Dismiss(); }
|
||||
|
||||
void FilamentGroupPopup::Dismiss() {
|
||||
m_active = false;
|
||||
PopupWindow::Dismiss();
|
||||
m_timer->Stop();
|
||||
}
|
||||
|
||||
void FilamentGroupPopup::OnLeaveWindow(wxMouseEvent &)
|
||||
{
|
||||
wxPoint pos = this->ScreenToClient(wxGetMousePosition());
|
||||
|
||||
Reference in New Issue
Block a user