MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[Workspaces] Undo/Redo panel wrong placement after creating a new workspace (or Reset Default workspace in 4.6)

Open DmitryArefiev opened this issue 1 year ago • 3 comments

Issue type

UI bug (incorrect info or interface appearance)

Description with steps to reproduce

Steps for 4.5.x

  1. Workspaces>Create new workspace>Select - Undo/Redo controls appear from the right on additional panel

Steps for 4.6

  1. Go to Workspace
  2. Edit workspaces
  3. Reset Default workspace

'Restore the default layout' restores the right layout of panels

Supporting files, videos and screenshots

4.5:

https://github.com/user-attachments/assets/09df7c75-fa68-46e2-b414-5de2007d3692

4.6:

https://github.com/user-attachments/assets/25c32f4a-e233-47f0-bb39-d262a3c3bd9f

What is the latest version of MuseScore Studio where this issue is present?

4.5 nightly

Regression

Yes, this works in the latest released version and is broken in the nightly builds

Operating system

all

Additional context

No response

Checklist

  • [X] This report follows the guidelines for reporting bugs and issues
  • [X] I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • [X] I have attached all requested files and information to this report
  • [X] I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

DmitryArefiev avatar Jan 10 '25 16:01 DmitryArefiev

I fixed it in #26384, I think

UPD: No

Eism avatar Feb 24 '25 16:02 Eism

In addition to the appearance of the Redo/Undo bar, Workspace settings (position of panels, for instance) are not being saved nor retrieved. Thank you.

mintster avatar Apr 06 '25 16:04 mintster

Seems to be caused by the Extensions toolbar located before the Undo/Redo toolbar. DockWindow::loadTopLevelToolBars adds the Undo/Redo toolbar to the right of the Extensions toolbar and this does not work when the Extensions toolbar is closed. The Extensions toolbar closes itself when empty (NotationPage.qml around line 189). In this case DockWindow::addDock calls m_mainWindow->addDockWidget but if the Extensions toolbar (which is in the relativeTo parameter) is not visible, it does not have a frame and DropArea::addDockWidget evaluates relativeToFrame to NULL (DropArea.cpp line 113). So it ends up without a relative frame and MultiSplitter::addWidget uses a default relative-to Widget relative to which "right" ends up being the right-hand side dock holder.

RestoreDefaultLayout does not have this problem because it first calls dock->resetToDefault(); for all docks and this makes them visible. Later reloadCurrentPage() -> doLoadPage() -> initDocks() calls page->init(); which calls dock->init(); for all docks and this resets the visibility of the Extensions toolbar (hides it because it is supposed to be hidden).

krasko78 avatar May 12 '25 00:05 krasko78