Undocked toolbar gone after restart

Krite 5.2.9, 5.3, 6.0.0 on Windows 11.

  • Undock a toolbar
  • Close Krita
  • Open Krita

Result:
Toolbar is not visible anymore (even though still active in “Toolbar shown” settings).

Only way to get it back is hacking the krita5.xmlgui file.

Very uncomfortable.

It might be floating somewhere visible with 0 width, I had this before and I may have gotten lucky fixing it when I try added 1 action to it (configure toolbars), then trying to resize the toolbar and the whole thing reappeared. Little bit sad to say I prefer not messing with the toolbars :man_shrugging: Currently I have 2 only visible on the welcome screen, not sure how how that happened, but at least BrushesAndStuff works :relieved_face: Good practice to have some of these files backed up.

So I am not alone :slight_smile:
Unfortunately backing up the xmlgui does not help at all.

For me only this works if a floating toolbar is gone:

  • close Krita
  • open the xmlgui in a text editor
  • cut the part with the dissapeared toolbar out of the xmlgui
  • save the xmlgui
  • start Krita
  • do nothing in Krita
  • close Krita
  • open the xmlgui again
  • paste the previously cut toolbar back into the xmlgui
  • save the xmlgui
  • start Krita
  • go to “Toolbars shown” menu and activate the “missing” toolbar

It now appears again at the top right of the UI.

I’ll make a bug ticket in the hope somebody is so kind to confirm it.

Link to bug ticket:

1 Like

Confirmed that the floating toolbar disappears on restart, and modifying the toolbar with Configure Toolbars causes it to reappear where I left it.

For some reason the toolbar’s updatesEnabled is false, which causes it to not receive paint events. This script causes it to appear, if the floated toolbar was File (‘mainToolBar’):

from krita import *

Krita.instance().activeWindow().qwindow().findChild(QToolBar,'mainToolBar').setUpdatesEnabled(True)

The reason using a backup .xmlgui file does nothing is because the .xmlgui file is not modified by floating the toolbar. But when you remove and re-add the toolbar to the file it presumably causes it to reload simliar to modifying it with Configure Toolbars.

2 Likes

If you’d like all 3 to appear, go to Settings > Toolbars shown and place a checkmark next to all 3.

It’s a bit confusing because they seem to show up there when Krita loads, but disappear when a document is loaded :thinking: When the document is loaded, BrushesAndStuff toolbar appears (and is now ticked) but now the others are hidden… If I tick the others, they still don’t show up. To make them visible it seems adding an action in configure toolbars refreshes them or something. At least I can add some actions to the welcome screen if I wanted​:ok_hand:

Thank you @freyalupen ,
the script is a great workaround.

Until now I had to dock the toolbar before closing Krita.
But I forgot that often and then had to go through the “hack the xmlgui” hassle.

Now I put your script into a ten scripts slot and get the toolbar back easily.

Wrong post.

Update:
It is resolved in 5.3 prealpha.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.