From 57b7fbe7f6408fb4b85794e2b7e935ddd5604686 Mon Sep 17 00:00:00 2001 From: parax0 Date: Mon, 7 Mar 2016 21:14:43 -0700 Subject: [PATCH] Split check for picking into a separate line --- src/Editor/WorldEditor/CWorldEditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 26543c08..7f0e0dbb 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -528,7 +528,9 @@ void CWorldEditor::UpdateNewLinkLine() // Compensate for missing sender or missing receiver else { - if (ui->MainViewport->underMouse() && !ui->MainViewport->IsMouseInputActive() && (mIsMakingLink || mpLinkDialog->IsPicking() || ui->ModifyTabContents->IsPicking())) + bool IsPicking = (mIsMakingLink || mpLinkDialog->IsPicking() || ui->ModifyTabContents->IsPicking()); + + if (ui->MainViewport->underMouse() && !ui->MainViewport->IsMouseInputActive() && IsPicking) { CSceneNode *pHoverNode = ui->MainViewport->HoverNode(); CScriptObject *pInst = (pSender ? pSender : pReceiver);