Draw the edit link line when picking from the modify tab
This commit is contained in:
parent
95d4deeab6
commit
4b8a42f341
|
@ -511,6 +511,8 @@ void CWorldEditor::UpdateNewLinkLine()
|
|||
}
|
||||
else if (mIsMakingLink && mpNewLinkSender)
|
||||
pSender = mpNewLinkSender;
|
||||
else if (ui->ModifyTabContents->IsPicking() && ui->ModifyTabContents->EditNode()->NodeType() == eScriptNode)
|
||||
pSender = static_cast<CScriptNode*>(ui->ModifyTabContents->EditNode())->Object();
|
||||
|
||||
// No sender and no receiver = no line
|
||||
if (!pSender && !pReceiver)
|
||||
|
@ -526,7 +528,7 @@ void CWorldEditor::UpdateNewLinkLine()
|
|||
// Compensate for missing sender or missing receiver
|
||||
else
|
||||
{
|
||||
if (ui->MainViewport->underMouse() && !ui->MainViewport->IsMouseInputActive() && (mIsMakingLink || mpLinkDialog->IsPicking()))
|
||||
if (ui->MainViewport->underMouse() && !ui->MainViewport->IsMouseInputActive() && (mIsMakingLink || mpLinkDialog->IsPicking() || ui->ModifyTabContents->IsPicking()))
|
||||
{
|
||||
CSceneNode *pHoverNode = ui->MainViewport->HoverNode();
|
||||
CScriptObject *pInst = (pSender ? pSender : pReceiver);
|
||||
|
|
|
@ -136,11 +136,13 @@ void WModifyTab::OnLinksSelectionModified()
|
|||
{
|
||||
u32 NumSelectedRows = ui->InLinksTableView->selectionModel()->selectedRows().size();
|
||||
ui->EditIncomingConnectionButton->setEnabled(NumSelectedRows == 1);
|
||||
ui->DeleteIncomingConnectionButton->setEnabled(NumSelectedRows > 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 NumSelectedRows = ui->OutLinksTableView->selectionModel()->selectedRows().size();
|
||||
ui->EditOutgoingConnectionButton->setEnabled(NumSelectedRows == 1);
|
||||
ui->DeleteOutgoingConnectionButton->setEnabled(NumSelectedRows > 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@ public slots:
|
|||
void OnDeleteLinksClicked();
|
||||
void OnEditLinkClicked();
|
||||
|
||||
inline bool IsPicking() const { return mIsPicking; }
|
||||
inline CSceneNode* EditNode() const { return mpSelectedNode; }
|
||||
|
||||
private:
|
||||
Ui::WModifyTab *ui;
|
||||
|
||||
|
|
|
@ -218,6 +218,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="DeleteOutgoingConnectionButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
|
@ -335,6 +338,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="DeleteIncomingConnectionButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue