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);
|
AutoLocker< ::Team> locker(fTeam);
|
||||||
|
|
||||||
SourceCode* sourceCode = fActiveFunction->GetFunction()->GetSourceCode();
|
SourceCode* sourceCode = fActiveFunction->GetFunction()->GetSourceCode();
|
||||||
if (sourceCode == NULL) {
|
LocatableFile* sourceFile = NULL;
|
||||||
|
BString sourceText;
|
||||||
|
if (sourceCode == NULL)
|
||||||
sourceCode = fActiveFunction->GetSourceCode();
|
sourceCode = fActiveFunction->GetSourceCode();
|
||||||
|
|
||||||
BString sourceText;
|
if (sourceCode != NULL)
|
||||||
LocatableFile* sourceFile = fActiveFunction->GetFunctionDebugInfo()
|
sourceFile = fActiveFunction->GetFunctionDebugInfo()->SourceFile();
|
||||||
->SourceFile();
|
|
||||||
if (sourceFile != NULL && !sourceFile->GetLocatedPath(sourceText))
|
|
||||||
sourceFile->GetPath(sourceText);
|
|
||||||
|
|
||||||
if (sourceCode != NULL && sourceCode->GetSourceFile() == NULL
|
if (sourceFile != NULL && !sourceFile->GetLocatedPath(sourceText))
|
||||||
&& sourceFile != NULL) {
|
sourceFile->GetPath(sourceText);
|
||||||
sourceText.Prepend("Click to locate source file '");
|
|
||||||
sourceText += "'";
|
if (sourceCode != NULL && sourceCode->GetSourceFile() == NULL
|
||||||
fSourcePathView->SetText(sourceText.String());
|
&& sourceFile != NULL) {
|
||||||
} else if (sourceFile != NULL) {
|
sourceText.Prepend("Click to locate source file '");
|
||||||
sourceText.Prepend("File: ");
|
sourceText += "'";
|
||||||
fSourcePathView->SetText(sourceText.String());
|
fSourcePathView->SetText(sourceText.String());
|
||||||
} else
|
} else if (sourceFile != NULL) {
|
||||||
fSourcePathView->SetText("Source file unavailable.");
|
sourceText.Prepend("File: ");
|
||||||
}
|
fSourcePathView->SetText(sourceText.String());
|
||||||
|
} else
|
||||||
|
fSourcePathView->SetText("Source file unavailable.");
|
||||||
|
|
||||||
BReference<SourceCode> sourceCodeReference(sourceCode);
|
BReference<SourceCode> sourceCodeReference(sourceCode);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user