From 6fe1df8e6e27c3bfca23f4d393f07206739fa64c Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 8 Nov 2022 08:24:44 +0800 Subject: [PATCH] - fix: Can't goto definition of classes and namespaces displayed in the class browser on whole project mode. --- NEWS.md | 1 + RedPandaIDE/widgets/classbrowser.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index d31b0b9d..cfbea4f6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,7 @@ Red Panda C++ Version 2.4 - enhancement: Remove todos/bookmarks/breakpoints when deleting file from project - enhancement: Rename filenames in todos/bookmarks/breakpoints when renaming project file - enhancement: Rename filenames in bookmarks/breakpoints after a file is save-ased. + - fix: Can't goto definition of classes and namespaces displayed in the class browser on whole project mode. Red Panda C++ Version 2.3 diff --git a/RedPandaIDE/widgets/classbrowser.cpp b/RedPandaIDE/widgets/classbrowser.cpp index fd674865..3bf68af6 100644 --- a/RedPandaIDE/widgets/classbrowser.cpp +++ b/RedPandaIDE/widgets/classbrowser.cpp @@ -400,10 +400,10 @@ PStatement ClassBrowserModel::createDummy(const PStatement& statement) result->inSystemHeader = statement->inSystemHeader; result->isStatic = statement->isStatic; result->isInherited = statement->isInherited; - result->fileName = mCurrentFile; - result->definitionFileName = mCurrentFile; - result->line = 0; - result->definitionLine = 0; + result->fileName= statement->fileName; + result->line = statement->line; + result->definitionFileName = statement->fileName; + result->definitionLine = statement->definitionLine; mDummyStatements.insert(result->fullName,result); return result; }