Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving to a next/prev remote browser tab changes the currently active recipe tab #231

Open
foundry-markf opened this issue Jan 9, 2025 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@foundry-markf
Copy link
Contributor

Repro:

  • Open two recipes; make the second tab active.
  • Open the remote browser, fill in the details, search for a recipe, double click on a package ref found
  • Note that the recipe tab has changed.

Sometimes it's happened when double clicking on a recipe revision in the remote browser.

This is distracting because I'm often looking up details in an error on a recipe tab output.

@markfinal
Copy link
Owner

Although this occurs for the call to setCurrentIndex on the remote browser's QStackedWidget, I cannot see any connection between it and the QMainWindow's QMdiArea containing the recipe tabs.

I also changed the call to setCurrentWidget for the remote browser, and it still happened, which makes me think this is not a signal connection.

I did try building KDAB's GammaRay, but it refused to connect to cruiz, either as a running process or to launch if from scratch.

@markfinal
Copy link
Owner

Adding a connection

        mdi_area.subWindowActivated.connect(self._pane_changed)

in the main window, shows that the change occurs in the Qt event loop.

@markfinal
Copy link
Owner

Adding an installEventFilter onto the QMdiArea and printing the event types, e.g.

class Eater(QtCore.QObject):
    def eventFilter(self, watched, event):
        print(QtCore.QEvent.Type(event.type()).name)
        return super().eventFilter(watched, event)

...

        self._eater = Eater()
        mdi_area.installEventFilter(self._eater)

shows no events being encountered before the connection mdi_area.subWindowActivated.connect(self._pane_changed) above.

I do see a lot of events printed of ChildAdded, ChildRemoved, Paint, Move, Resize after double clicking on a package reference in the Remote Browser, which seems a bit weird, as I only installed the filter on the QMdiArea in the main window, which should not be associated with it.

@markfinal markfinal added bug Something isn't working help wanted Extra attention is needed labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants