Skip to content

Commit b58f2c8

Browse files
committed
Engine: Hide new monitors after calling the callback
1 parent 74436eb commit b58f2c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/engine/internal/engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,8 +1436,6 @@ void Engine::addVarOrListMonitor(std::shared_ptr<Monitor> monitor, Target *targe
14361436
if (!target->isStage())
14371437
monitor->setSprite(dynamic_cast<Sprite *>(target));
14381438

1439-
monitor->setVisible(false);
1440-
14411439
// Auto-position the monitor
14421440
Rect rect = Monitor::getInitialPosition(m_monitors, monitor->width(), monitor->height());
14431441
monitor->setX(rect.left());
@@ -1447,6 +1445,8 @@ void Engine::addVarOrListMonitor(std::shared_ptr<Monitor> monitor, Target *targe
14471445

14481446
if (m_addMonitorHandler)
14491447
m_addMonitorHandler(monitor.get());
1448+
1449+
monitor->setVisible(false);
14501450
}
14511451

14521452
void Engine::updateFrameDuration()

0 commit comments

Comments
 (0)