ui: Fixed correct location not always shown in single file code view when going back to activated edge

This commit is contained in:
Eberhard Graether
2018-01-28 23:32:37 +01:00
parent 079be93667
commit d953bcaa9d
3 changed files with 9 additions and 4 deletions
@@ -32,7 +32,6 @@ void CodeController::handleMessage(MessageActivateAll* message)
TRACE("code all");
saveOrRestoreViewMode(message);
clear();
Project* currentProject = Application::getInstance()->getCurrentProject().get();
if (!currentProject || message->acceptedNodeTypes != NodeTypeSet::all())
@@ -46,11 +46,13 @@ public:
virtual void print(std::ostream& os) const
{
os << filePath.str();
switch (state)
{
case FILE_MINIMIZED: os << "minimize"; break;
case FILE_SNIPPETS: os << "snippets"; break;
case FILE_MAXIMIZED: os << "maximize"; break;
case FILE_MINIMIZED: os << ", minimize"; break;
case FILE_SNIPPETS: os << ", snippets"; break;
case FILE_MAXIMIZED: os << ", maximize"; break;
}
switch (viewMode)
@@ -459,6 +459,10 @@ void QtCodeNavigator::showActiveSnippet(
m_list->requestFileContent(filePath);
}
}
else if (firstReference.tokenId)
{
m_single->requestFileContent(firstReference.filePath);
}
if (firstReference.tokenId)
{