FIX: ui issues with filament map dialog

jira:STUDIO-10040,STUDIO-10039

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I939df4fc0fe3eb8d287cf1efc7d459c0790d04c7
(cherry picked from commit e24a0bc60323a528b020d21871405c95f1775e0c)
This commit is contained in:
xun.zhang
2025-01-20 12:26:43 +08:00
committed by Noisyfox
parent e89c217da8
commit 324816cc6f
3 changed files with 23 additions and 15 deletions

View File

@@ -201,10 +201,8 @@ void DragDropPanel::AddColorBlock(const wxColour &color, int filament_id, bool u
m_filament_blocks.push_back(panel);
if (update_ui) {
m_filament_blocks.front()->Refresh(); // FIX BUG: STUDIO-8467
Layout();
Fit();
GetParent()->Layout();
GetParent()->Fit();
GetParent()->GetParent()->Layout();
GetParent()->GetParent()->Fit();
}
}
@@ -214,10 +212,8 @@ void DragDropPanel::RemoveColorBlock(ColorPanel *panel, bool update_ui)
panel->Destroy();
m_filament_blocks.erase(std::remove(m_filament_blocks.begin(), m_filament_blocks.end(), panel), m_filament_blocks.end());
if (update_ui) {
Layout();
Fit();
GetParent()->Layout();
GetParent()->Fit();
GetParent()->GetParent()->Layout();
GetParent()->GetParent()->Fit();
}
}