mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 13:05:57 +08:00
temporary add scope guard test for MacOs
This commit is contained in:
parent
8d54798231
commit
36f6c8bf65
@ -1138,6 +1138,23 @@ void GLGizmoEmboss::discard_and_close() {
|
||||
// * Volume containing 3mf fix transformation - needs work around
|
||||
}
|
||||
|
||||
void scopeguard_test() {
|
||||
bool v = false;
|
||||
{
|
||||
ScopeGuard sg;
|
||||
if (!v) {
|
||||
v = true;
|
||||
sg = ScopeGuard([&v]() {
|
||||
if(!v) wxMessageBox("Guard is called twice.");
|
||||
v = false;
|
||||
});
|
||||
if (!v) wxMessageBox("v should be true in condition.");
|
||||
}
|
||||
if (!v) wxMessageBox("v should be true in scope.");
|
||||
}
|
||||
if (v) wxMessageBox("v should NOT be true.");
|
||||
}
|
||||
|
||||
void GLGizmoEmboss::draw_window()
|
||||
{
|
||||
#ifdef ALLOW_DEBUG_MODE
|
||||
@ -1155,6 +1172,8 @@ void GLGizmoEmboss::draw_window()
|
||||
m_imgui->disabled_end();
|
||||
});
|
||||
|
||||
scopeguard_test();
|
||||
|
||||
draw_text_input();
|
||||
draw_model_type();
|
||||
draw_style_list();
|
||||
|
Loading…
x
Reference in New Issue
Block a user