View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0014483 | Scribus | User Interface | public | 2016-12-18 05:43 | 2026-08-30 16:42 |
| Reporter | CGoodwin | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | Lenovo Thinkpad T420 | OS | Linux Mint | OS Version | 17.2 |
| Product Version | 1.5.1 | ||||
| Summary | 0014483: Guide Manager > Column/Row> Selection is grayed out | ||||
| Description | I am getting interesting behaviour in using the selection function in; Guide Manager > Column/Row > Selection. It remains grayed out if I just set up and select text frames or shapes, and try to deploy "Selection"; the "Selection" option remains grayed out. The workaround: If I have a selected text or shape frame on the page, the "selection" option remains grayed out - but if I then move that frame using the mouse, "selected" becomes available. Moving the frame makes the system recognise that the "selected" option should be available. Moving via the keyboard fails to get the system to recognize the selectable frame. Alternative workarounds 1. Have a selected frame on the page and drag a single guide from the ruler onto the page - "selected" will become available. Alternative workaround 2. Have a frame not on the page. Move it it onto the page - "selected" will become available. | ||||
| Steps To Reproduce | Have a selected frame on a page. Open Guide Manager > Column/Row > Selection. "selection" will be grayed out. Move the selected frame and "Selection" will become available. | ||||
| Additional Information | Appears similar to bug report 0009796. My system: Lenovo T420 w/ i5 Scribus Version 1.5.1 14 February 2016 Build ID: C-C-T-F-C1.13.1-64bit Using Ghostscript version 9.10 on Linux Mint 17.2 Kernel: Linux 3.16.0-38-generic (x86_64) I'm new to bug reporting so if I have not explained well, I apologize. If any questions, I'll be happy to answer. | ||||
| Tags | guides | ||||
| Patch | No | ||||
|
|
I can still reproduce it in 1.7.4 (r27798) Here is the patch that fixed it in my testing. The ai explains so: #Cause: `GuideManager::setupGui()` checked `m_Selection->isNotEmpty()`, but Guide Manager was not connected to `Selection::selectionChanged()`, leaving the UI state stale. #Fix: connect the active document selection to a small `updateSelectionAvailability()` helper and reuse that helper from `setupGui()`. #Why this approach: it updates only the dependent enabled-state at the actual source-of-truth event, instead of relying on incidental `setupPage()`/GUI refreshes from moves, guides, or other actions. #Behavior preserved: no guide regeneration or selection-rectangle changes; existing guides remain independent after creation. #Files touched: `ui/guidemanager.cpp/.h`. guide-manager-selection-availability-r27798-v1.0.patch (2,246 bytes)
Index: scribus/ui/guidemanager.cpp
===================================================================
--- scribus/ui/guidemanager.cpp (revision 27798)
+++ scribus/ui/guidemanager.cpp (working copy)
@@ -102,6 +102,9 @@
void GuideManager::setDoc(ScribusDoc* doc)
{
+ if (m_doc)
+ disconnect(m_doc->m_Selection, &Selection::selectionChanged, this, &GuideManager::updateSelectionAvailability);
+
if (m_doc && (m_doc != doc))
{
if (currentPage && (currentPage->doc() == m_doc))
@@ -112,6 +115,8 @@
m_doc = doc;
if (m_doc)
{
+ connect(m_doc->m_Selection, &Selection::selectionChanged, this, &GuideManager::updateSelectionAvailability);
+
int oldUnitIndex = docUnitIndex;
if (oldUnitIndex != m_doc->unitIndex())
unitChange();
@@ -122,6 +127,14 @@
if (!m_doc)
currentPage = nullptr;
tabWidget->setEnabled(doc != nullptr);
+ updateSelectionAvailability();
+}
+
+void GuideManager::updateSelectionAvailability()
+{
+ const bool hasSelection = m_doc && m_doc->m_Selection->isNotEmpty();
+ horizontalSelectionAutoButton->setEnabled(hasSelection);
+ verticalSelectionAutoButton->setEnabled(hasSelection);
}
void GuideManager::setVisible(bool visible)
@@ -169,8 +182,6 @@
horizontalAutoGapCheck->setEnabled(false);
}
setHorizontalRefer(currentPage->guides.horizontalAutoRefer());
- // allow the selection radio button?
- horizontalSelectionAutoButton->setEnabled(m_doc->m_Selection->isNotEmpty());
// verticals
enable = currentPage->guides.verticalAutoGap() > 0.0;
@@ -184,8 +195,7 @@
verticalAutoGapCheck->setEnabled(false);
}
setVerticalRefer(currentPage->guides.verticalAutoRefer());
- // allow the selection radio button?
- verticalSelectionAutoButton->setEnabled(m_doc->m_Selection->isNotEmpty());
+ updateSelectionAvailability();
// restore guide locking
lockCheck->setChecked(m_doc->GuideLock);
Index: scribus/ui/guidemanager.h
===================================================================
--- scribus/ui/guidemanager.h (revision 27798)
+++ scribus/ui/guidemanager.h (working copy)
@@ -127,6 +127,7 @@
int horizontalRefer() const;
void setVerticalRefer(int button);
int verticalRefer() const;
+ void updateSelectionAvailability();
void languageChange();
private slots:
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-12-18 05:43 | CGoodwin | New Issue | |
| 2016-12-18 14:39 | Kunda | Additional Information Updated | |
| 2016-12-18 14:44 | Kunda | Tag Attached: guides | |
| 2026-08-30 16:42 | qirat | Note Added: 0054381 | |
| 2026-08-30 16:42 | qirat | File Added: guide-manager-selection-availability-r27798-v1.0.patch |