fix crush on inserting fx

This commit is contained in:
shun-iwasawa 2021-10-08 15:56:15 +09:00 committed by manongjohn
parent 3d97c97faf
commit 63d31c2d60

View file

@ -2194,8 +2194,12 @@ bool FxSchematicScene::isAnEmptyZone_withParentFx(const QRectF &rect,
if (fxNode && fxNode->isA(eXSheetFx)) continue; if (fxNode && fxNode->isA(eXSheetFx)) continue;
// check only the fxs sharing the same parent // check only the fxs sharing the same parent
if (!fxNode) continue; if (!fxNode) continue;
for (int p = 0; p < fxNode->getInputPortCount(); p++) { TFx *fx = fxNode->getFx();
if (parent == fxNode->getFx()->getInputPort(p)->getFx()) { if (TZeraryColumnFx *zfx = dynamic_cast<TZeraryColumnFx *>(fx))
fx = zfx->getZeraryFx();
if (!fx || fx == parent) continue;
for (int p = 0; p < fx->getInputPortCount(); p++) {
if (parent == fx->getInputPort(p)->getFx()) {
if (node->boundingRect().translated(node->scenePos()).intersects(rect)) if (node->boundingRect().translated(node->scenePos()).intersects(rect))
return false; return false;
else else