Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Q panel will get stuck while signin if users have multiple windows"
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
project.messageBus.connect(toolWindow.disposable).subscribe(
QRegionProfileSelectedListener.TOPIC,
object : QRegionProfileSelectedListener {
override fun onProfileSelected(project: Project, profile: QRegionProfile?) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line project is shadowing outside AmazonQToolWindowFactory.project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thus the following 2 lines also use the wrong project

AmazonQToolWindow.getInstance(project).disposeAndRecreate()
qPanel.setContent(AmazonQToolWindow.getInstance(project).component)

// note we name myProject intentionally ow it will shadow the "project" provided by the IDE
override fun onProfileSelected(myProject: Project, profile: QRegionProfile?) {
if (project.isDisposed) return
AmazonQToolWindow.getInstance(project).disposeAndRecreate()
qPanel.setContent(AmazonQToolWindow.getInstance(project).component)
Expand Down
Loading