3rd attempt to prevent showing old framebuffer when switching between views on Mac
This commit is contained in:
parent
628a868cfd
commit
81820fa77f
1 changed files with 17 additions and 0 deletions
|
@ -2222,6 +2222,10 @@ void Plater::priv::set_current_panel(wxPanel* panel)
|
||||||
if (std::find(panels.begin(), panels.end(), panel) == panels.end())
|
if (std::find(panels.begin(), panels.end(), panel) == panels.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
bool force_render = (current_panel != nullptr);
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
if (current_panel == panel)
|
if (current_panel == panel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2230,7 +2234,20 @@ void Plater::priv::set_current_panel(wxPanel* panel)
|
||||||
for (wxPanel* p : panels)
|
for (wxPanel* p : panels)
|
||||||
{
|
{
|
||||||
if (p == current_panel)
|
if (p == current_panel)
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
{
|
||||||
|
if (force_render)
|
||||||
|
{
|
||||||
|
if (p == view3D)
|
||||||
|
dynamic_cast<View3D*>(p)->get_canvas3d()->render();
|
||||||
|
else if (p == preview)
|
||||||
|
dynamic_cast<Preview*>(p)->get_canvas3d()->render();
|
||||||
|
}
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
p->Show();
|
p->Show();
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
}
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
}
|
}
|
||||||
// then set to invisible the other
|
// then set to invisible the other
|
||||||
for (wxPanel* p : panels)
|
for (wxPanel* p : panels)
|
||||||
|
|
Loading…
Add table
Reference in a new issue