ui: Show definition in code view when clicking active node in graph
This commit is contained in:
@@ -532,8 +532,15 @@ void QtCodeNavigator::scrollToLine(const FilePath& filePath, unsigned int line)
|
||||
requestScroll(filePath, line, 0, false, false);
|
||||
}
|
||||
|
||||
void QtCodeNavigator::scrollToDefinition()
|
||||
void QtCodeNavigator::scrollToDefinition(bool ignoreActiveReference)
|
||||
{
|
||||
if (ignoreActiveReference)
|
||||
{
|
||||
m_activeReference = Reference();
|
||||
m_refIndex = 0;
|
||||
updateRefLabel();
|
||||
}
|
||||
|
||||
if (m_activeReference.tokenId)
|
||||
{
|
||||
if (m_mode == MODE_LIST)
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
void scrollToValue(int value, bool inListMode);
|
||||
void scrollToLine(const FilePath& filePath, unsigned int line);
|
||||
void scrollToDefinition();
|
||||
void scrollToDefinition(bool ignoreActiveReference);
|
||||
|
||||
void scrollToSnippetIfRequested();
|
||||
|
||||
|
||||
@@ -165,12 +165,12 @@ void QtCodeView::scrollToLine(const FilePath filePath, unsigned int line)
|
||||
);
|
||||
}
|
||||
|
||||
void QtCodeView::scrollToDefinition()
|
||||
void QtCodeView::scrollToDefinition(bool ignoreActiveReference)
|
||||
{
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
m_widget->scrollToDefinition();
|
||||
m_widget->scrollToDefinition(ignoreActiveReference);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
virtual void scrollToValue(int value, bool inListMode);
|
||||
virtual void scrollToLine(const FilePath filePath, unsigned int line);
|
||||
virtual void scrollToDefinition();
|
||||
virtual void scrollToDefinition(bool ignoreActiveReference);
|
||||
|
||||
private:
|
||||
void doShowCodeSnippets(
|
||||
|
||||
@@ -153,7 +153,7 @@ void QtGraphView::clickedInEmptySpace()
|
||||
|
||||
if (activeEdgeCount == 1)
|
||||
{
|
||||
MessageDeactivateEdge().dispatch();
|
||||
MessageDeactivateEdge(false).dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void QtGraphNodeData::onClick()
|
||||
{
|
||||
if (m_isActive && !m_multipleActive)
|
||||
{
|
||||
MessageDeactivateEdge().dispatch();
|
||||
MessageDeactivateEdge(true).dispatch();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user