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

Toolbars are not created in pyface 8.0 #1251

Open
johannesloibl opened this issue Jun 12, 2023 · 1 comment
Open

Toolbars are not created in pyface 8.0 #1251

johannesloibl opened this issue Jun 12, 2023 · 1 comment

Comments

@johannesloibl
Copy link
Contributor

Hey,

there seems to be a copy&pasta error:

self._create_status_bar(self.control)

@observe("tool_bar_managers.items")
def _update_tool_bar_managers(self, event):
    if self.control is not None:
        # Remove the old toolbars.
        for child in self.control.children():
            if isinstance(child, QtGui.QToolBar):
                self.control.removeToolBar(child)
                child.deleteLater()

        # Add the new toolbars.
        if event.new is not None:
            self._create_status_bar(self.control)

The trait change handler for tool bars is creating the status bar instead of the tool bars ;)

@jirhiker
Copy link

jirhiker commented Apr 9, 2024

I can confirm this is an issue.

toolbars were not displaying in my envisage app. Changing the code to

@observe("tool_bar_managers.items")
def _update_tool_bar_managers(self, event):
    if self.control is not None:
        # Remove the old toolbars.
        for child in self.control.children():
            if isinstance(child, QtGui.QToolBar):
                self.control.removeToolBar(child)
                child.deleteLater()

        # Add the new toolbars.
        if event.new is not None:
            #self._create_status_bar(self.control)
             self._create_tool_bar(self.control)

appeared to resolve the issue.

Is there a timeline for when pyface 8.0.X will be released to permanently fix this bug?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants