View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017268 | Scribus | User Interface | public | 2024-09-14 12:22 | 2024-09-16 20:54 |
Reporter | nitramr | Assigned To | nitramr | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Desktop PC | OS | Ubuntu | OS Version | 24.04 64-bit |
Product Version | 1.7.0.svn | ||||
Target Version | 1.7.0 | ||||
Summary | 0017268: ScribusMainWindow::editMasterPagesStart() open empty page palette window | ||||
Description | Since we implemented the advanced docking system, we need to toggle visibility of dock widgets using the toogleView() function or just use show() and close() to get the correct behavior. ScribusMainWindow::editMasterPagesStart() still uses setVisibility() directly, and using visibility manipulation directly does not trigger functions in the dock manager to control visibility correctly. This visibility change results in an empty floating window. | ||||
Steps To Reproduce | 1. Open Scribus and configure the workspace that Arrange Pages and Outline window are stacked (Arrange Pages is not visible) 2. Create a new document 3. Open Outline window and click on the master page in the tree (should be "normal") 4. Now, there is an empty floating window with title "Manage Masterpages" Hint: This window is empty because "Arrange Pages" window is already docked, but the dock manager was not called to manage the right visibility state | ||||
Additional Information | The fix implements the same behavior of 1.6.2 | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
pagepalette_fix_2024-09-14_01.patch (2,137 bytes)
Index: scribus/scribus.cpp =================================================================== --- scribus/scribus.cpp (Revision 26284) +++ scribus/scribus.cpp (Arbeitskopie) @@ -245,6 +245,7 @@ #include "util_file.h" #include "util_formats.h" #include "third_party/Qt-Advanced-Docking-System/src/IconProvider.h" +#include "third_party/Qt-Advanced-Docking-System/src/DockAreaWidget.h" #ifdef HAVE_SVNVERSION #include "svnversion.h" @@ -7573,10 +7574,10 @@ } void ScribusMainWindow::editMasterPagesStart(const QString& temp) -{ +{ if (!HaveDoc) return; - m_pagePalVisible = pagePalette->isVisible(); + m_pagePaletteWasClosed = pagePalette->isClosed(); QString mpName; if (temp.isEmpty()) mpName = doc->currentPage()->masterPageName(); @@ -7604,10 +7605,12 @@ view->saveViewState(); pagePalette->startMasterPageMode(mpName); - if (!pagePalette->isVisible()) + if (pagePalette->isClosed()) { - pagePalette->show(); + auto* area = pagePalette->dockAreaWidget(); + auto* dockWidget = area->currentDockWidget(); scrActions["toolsPages"]->setChecked(true); + area->setCurrentDockWidget(dockWidget); } appModeHelper->setMasterPageEditMode(true, doc); } @@ -7627,10 +7630,9 @@ Apply_MasterPage(doc->DocPages.at(i)->masterPageName(), i, false); pagePalette->endMasterPageMode(); - if (pagePalette->isFloating()) + if (m_pagePaletteWasClosed && pagePalette->isFloating()) { - pagePalette->setVisible(m_pagePalVisible); - scrActions["toolsPages"]->setChecked(m_pagePalVisible); + scrActions["toolsPages"]->setChecked(false); } ScribusView::ViewState viewState = view->topViewState(); Index: scribus/scribus.h =================================================================== --- scribus/scribus.h (Revision 26284) +++ scribus/scribus.h (Arbeitskopie) @@ -665,7 +665,7 @@ bool insertMarkDialog(PageItem_TextFrame* item, MarkType mT, ScItemsState* &is, const QString &text, int markInsertPosition); int m_marksCount { 0 }; //remember marks count from last call bool m_WasAutoSave { false }; - bool m_pagePalVisible { false }; + bool m_pagePaletteWasClosed { true }; }; #endif |
|
Committed, thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-09-14 12:22 | nitramr | New Issue | |
2024-09-14 12:22 | nitramr | File Added: pagepalette_fix_2024-09-14_01.patch | |
2024-09-14 12:22 | nitramr | File Added: floatingwindow.png | |
2024-09-16 19:51 | jghali | Assigned To | => nitramr |
2024-09-16 19:51 | jghali | Status | new => resolved |
2024-09-16 19:51 | jghali | Resolution | open => fixed |
2024-09-16 19:51 | jghali | Note Added: 0051354 | |
2024-09-16 20:54 | cbradney | Status | resolved => closed |