Rearrange _HandleSourceCodeChanged() a bit so it correctly handles updating
the current source path when changing frames in all cases. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42322 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1006,26 +1006,27 @@ TeamWindow::_HandleSourceCodeChanged()
|
||||
AutoLocker< ::Team> locker(fTeam);
|
||||
|
||||
SourceCode* sourceCode = fActiveFunction->GetFunction()->GetSourceCode();
|
||||
if (sourceCode == NULL) {
|
||||
LocatableFile* sourceFile = NULL;
|
||||
BString sourceText;
|
||||
if (sourceCode == NULL)
|
||||
sourceCode = fActiveFunction->GetSourceCode();
|
||||
|
||||
BString sourceText;
|
||||
LocatableFile* sourceFile = fActiveFunction->GetFunctionDebugInfo()
|
||||
->SourceFile();
|
||||
if (sourceFile != NULL && !sourceFile->GetLocatedPath(sourceText))
|
||||
sourceFile->GetPath(sourceText);
|
||||
if (sourceCode != NULL)
|
||||
sourceFile = fActiveFunction->GetFunctionDebugInfo()->SourceFile();
|
||||
|
||||
if (sourceCode != NULL && sourceCode->GetSourceFile() == NULL
|
||||
&& sourceFile != NULL) {
|
||||
sourceText.Prepend("Click to locate source file '");
|
||||
sourceText += "'";
|
||||
fSourcePathView->SetText(sourceText.String());
|
||||
} else if (sourceFile != NULL) {
|
||||
sourceText.Prepend("File: ");
|
||||
fSourcePathView->SetText(sourceText.String());
|
||||
} else
|
||||
fSourcePathView->SetText("Source file unavailable.");
|
||||
}
|
||||
if (sourceFile != NULL && !sourceFile->GetLocatedPath(sourceText))
|
||||
sourceFile->GetPath(sourceText);
|
||||
|
||||
if (sourceCode != NULL && sourceCode->GetSourceFile() == NULL
|
||||
&& sourceFile != NULL) {
|
||||
sourceText.Prepend("Click to locate source file '");
|
||||
sourceText += "'";
|
||||
fSourcePathView->SetText(sourceText.String());
|
||||
} else if (sourceFile != NULL) {
|
||||
sourceText.Prepend("File: ");
|
||||
fSourcePathView->SetText(sourceText.String());
|
||||
} else
|
||||
fSourcePathView->SetText("Source file unavailable.");
|
||||
|
||||
BReference<SourceCode> sourceCodeReference(sourceCode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user