View Issue Details

IDProjectCategoryView StatusLast Update
0018026ScribusGuidespublic2026-10-26 12:57
Reporterbuttar Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformLinuxOSFedora WorkstationOS Version44
Product Version1.7.4.svn 
Summary0018026: [patch] GMU (2/2) Fix Guide Manager action history and guide operations
DescriptionManual-guide operations can produce incorrect or redundant Action History entries and unreliable undo/redo results.

Dependencies: GMU1 → GMU2 (from 0018025)

### gmu3-guide-history-correctness-v1.00.patch
- Replace bulk guide-list rebuilding with targeted guide operations.
- Prevent no-op history entries and group multiple deletions into one undoable operation.
- Handle overlapping guide positions with Merge guides history entries and correct undo/redo restoration.
- Harden guide operations against invalid positions and redundant updates.
Steps To Reproduce- Open Guide Manager → Manual Guides and Action History.
- Press +, enter a nonzero position and press Enter. An incorrect Remove guide entry appears.
- Double-click an existing guide and press Enter without changing its value. An unnecessary history entry is generated.
- Press Delete repeatedly without a selected guide. Spurious Remove entries appear.
TagsNo tags attached.
Attached Files
gmu3-guide-history-correctness-v1.00.patch (6,048 bytes)   
Index: scribus/guidemanagercore.cpp
===================================================================
--- scribus/guidemanagercore.cpp	(revision 27910)
+++ scribus/guidemanagercore.cpp	(working copy)
@@ -137,7 +137,8 @@
 	switch (type)
 	{
 		case Standard:
-			m_horizontalStdG.removeAt(m_horizontalStdG.indexOf(value));
+			if (!m_horizontalStdG.removeOne(value))
+				return;
 			if (UndoManager::undoEnabled())
 			{
 				auto* ss = new SimpleState(Um::DelHGuide, nullptr, Um::IGuides);
@@ -155,7 +156,8 @@
 	switch (type)
 	{
 		case Standard:
-			m_verticalStdG.removeAt(m_verticalStdG.indexOf(value));
+			if (!m_verticalStdG.removeOne(value))
+				return;
 			if (UndoManager::undoEnabled())
 			{
 				auto* ss = new SimpleState(Um::DelVGuide, nullptr, Um::IGuides);
@@ -383,7 +385,19 @@
 	switch (type)
 	{
 		case Standard:
-			m_horizontalStdG.removeAt(m_horizontalStdG.indexOf(from));
+			if (from == to || !m_horizontalStdG.removeOne(from))
+				return;
+			if (m_horizontalStdG.contains(to))
+			{
+				// Two existing guides at the same position become one.
+				if (UndoManager::undoEnabled())
+				{
+					auto* ss = new SimpleState(QObject::tr("Merge horizontal guides"), nullptr, Um::IGuides);
+					ss->set("REMOVE_H", from);
+					m_undoManager->action(m_page, ss);
+				}
+				return;
+			}
 			m_horizontalStdG.append(to);
 			if (UndoManager::undoEnabled())
 			{
@@ -403,7 +417,19 @@
 	switch (type)
 	{
 		case Standard:
-			m_verticalStdG.removeAt(m_verticalStdG.indexOf(from));
+			if (from == to || !m_verticalStdG.removeOne(from))
+				return;
+			if (m_verticalStdG.contains(to))
+			{
+				// Keep the destination; undo restores only the merged-away guide.
+				if (UndoManager::undoEnabled())
+				{
+					auto* ss = new SimpleState(QObject::tr("Merge vertical guides"), nullptr, Um::IGuides);
+					ss->set("REMOVE_V", from);
+					m_undoManager->action(m_page, ss);
+				}
+				return;
+			}
 			m_verticalStdG.append(to);
 			if (UndoManager::undoEnabled())
 			{
Index: scribus/ui/guidemanager.cpp
===================================================================
--- scribus/ui/guidemanager.cpp	(revision 27910)
+++ scribus/ui/guidemanager.cpp	(working copy)
@@ -25,10 +25,12 @@
 #include <QEvent>
 #include <QMetaObject>
 #include <QSignalBlocker>
+#include <utility>
 
 #include "guidemanager.h"
 #include "guidesdelegate.h"
 #include "guidesmodel.h"
+#include "guidesview.h"
 #include "iconmanager.h"
 #include "scpage.h"
 #include "scribuscore.h"
@@ -336,38 +338,59 @@
 
 void GuideManager::delHorButton_clicked()
 {
-	const QModelIndexList indexes = horizontalView->selectionModel()->selectedRows(0);
-	Guides v;
-
-	for (const QModelIndex& ix : indexes)
-		// here *must* go EditRole due truncations in DisplayRole
-		// see GuidesModel::data()
-		v.append(horizontalModel->data(ix, Qt::UserRole).toDouble());
-
-	horizontalModel->removeValues(v);
-
-	currentPage->guides.clearHorizontals(GuideManagerCore::Standard);
-	currentPage->guides.addHorizontals(horizontalModel->values(), GuideManagerCore::Standard);
-	drawGuides();
-	m_doc->changed();
+	deleteSelectedGuides(horizontalView, horizontalModel, true);
 }
 
 void GuideManager::delVerButton_clicked()
 {
-	const QModelIndexList indexes = verticalView->selectionModel()->selectedRows(0);
-	Guides v;
+	deleteSelectedGuides(verticalView, verticalModel, false);
+}
+
+void GuideManager::deleteSelectedGuides(GuidesView* view, GuidesModel* model, bool horizontal)
+{
+	if (!currentPage)
+		return;
+	const QModelIndexList indexes = view->selectionModel()->selectedRows(0);
+	if (indexes.isEmpty())
+		return;
 
+	Guides selected;
+	Guides committed;
+	const Guides existing = horizontal ? currentPage->guides.horizontals(GuideManagerCore::Standard)
+	                                   : currentPage->guides.verticals(GuideManagerCore::Standard);
 	for (const QModelIndex& ix : indexes)
-		// here *must* go EditRole due truncations in DisplayRole
-		// see GuidesModel::data()
-		v.append(verticalModel->data(ix, Qt::UserRole).toDouble());
+	{
+		const double position = model->data(ix, Qt::UserRole).toDouble();
+		if (selected.contains(position))
+			continue;
+		selected.append(position);
+		if (existing.contains(position))
+			committed.append(position);
+	}
+	if (selected.isEmpty())
+		return;
 
-	verticalModel->removeValues(v);
+	UndoTransaction trans;
+	if (committed.count() > 1 && UndoManager::undoEnabled())
+		trans = UndoManager::instance()->beginTransaction(currentPage->getUName(), currentPage->getUPixmap(),
+		                                                 horizontal ? tr("Remove horizontal guides") : tr("Remove vertical guides"),
+		                                                 "", Um::IGuides);
+	for (double position : std::as_const(committed))
+	{
+		if (horizontal)
+			currentPage->guides.deleteHorizontal(position, GuideManagerCore::Standard);
+		else
+			currentPage->guides.deleteVertical(position, GuideManagerCore::Standard);
+	}
+	if (trans)
+		trans.commit();
 
-	currentPage->guides.clearVerticals(GuideManagerCore::Standard);
-	currentPage->guides.addVerticals(verticalModel->values(), GuideManagerCore::Standard);
-	drawGuides();
-	m_doc->changed();
+	model->removeValues(selected);
+	if (!committed.isEmpty())
+	{
+		drawGuides();
+		m_doc->changed();
+	}
 }
 
 void GuideManager::addHorButton_clicked()
Index: scribus/ui/guidemanager.h
===================================================================
--- scribus/ui/guidemanager.h	(revision 27910)
+++ scribus/ui/guidemanager.h	(working copy)
@@ -16,6 +16,7 @@
 #include "scpage.h"
 
 class GuidesModel;
+class GuidesView;
 class ScribusDoc;
 class QToolButton;
 
@@ -120,6 +121,7 @@
 
 	/*! \brief Draw guides into painter */
 	void drawGuides();
+	void deleteSelectedGuides(GuidesView* view, GuidesModel* model, bool horizontal);
 	void guideValueChanged(bool horizontal, double oldPosition, double newPosition);
 	void addGuide(bool horizontal, double position);
 	void setAddButtonEditing(QToolButton *button, bool editing, bool horizontal);
PatchYes

Relationships

related to 0018025 resolvedcbradney [patch] Improve Guide Manager UI and editing UX 

Activities

buttar

2026-10-20 11:12

reporter   ~0054574

Reproduce (step 2 correction): after the first Enter, you might have to enter the editing mode again and press Enter once more

Here is a clip showing other issues (on a slightly older build before the GM UI update)

buttar

2026-10-26 12:57

reporter   ~0054617

## Changes from GMU3 → GMR2 v1.02

- Baseline/dependency: r27915 + GMR1 v1.04 (from 0018025). This is the last in the series of 2 patches.

- Multi-page Undo/Redo: Adds atomic, undoable Apply-to-all-pages operations for manual and automatic guides separately.
- Category isolation: Undo/Redo restores only the affected guide category, preserving unrelated settings.
- State snapshots: Records before/after guide states for reliable restoration across multiple pages.
- Automatic guides: Recalculates guide positions using each destination page's geometry.
- Action History: Adds grouped transactions for multi-page Apply operations and avoids recording unchanged destinations.
- Deletion hardening: Adds explicit protection against treating pending editor rows as committed guides.
- Redraw efficiency: Uses page-specific repaint bounds and avoids unnecessary full-canvas redraws.
gmr2-guide-operations-correctness-v1.02.patch (14,467 bytes)   
Index: scribus/guidemanagercore.cpp
===================================================================
--- scribus/guidemanagercore.cpp	(revision 27915)
+++ scribus/guidemanagercore.cpp	(working copy)
@@ -33,6 +33,49 @@
 {
 }
 
+GuideManagerCore::Snapshot GuideManagerCore::snapshot() const
+{
+	Snapshot state;
+	state.horizontalStandard = m_horizontalStdG;
+	state.verticalStandard = m_verticalStdG;
+	state.horizontalAuto = m_horizontalAutoG;
+	state.verticalAuto = m_verticalAutoG;
+	state.horizontalCount = m_horizontalAutoCount;
+	state.verticalCount = m_verticalAutoCount;
+	state.horizontalGap = m_horizontalAutoGap;
+	state.verticalGap = m_verticalAutoGap;
+	state.horizontalRefer = m_horizontalAutoRefer;
+	state.verticalRefer = m_verticalAutoRefer;
+	state.gx = gx;
+	state.gy = gy;
+	state.gw = gw;
+	state.gh = gh;
+	return state;
+}
+
+void GuideManagerCore::restoreSnapshot(const Snapshot& state, GuideType type)
+{
+	if (type == Standard)
+	{
+		m_horizontalStdG = state.horizontalStandard;
+		m_verticalStdG = state.verticalStandard;
+		return;
+	}
+
+	m_horizontalAutoG = state.horizontalAuto;
+	m_verticalAutoG = state.verticalAuto;
+	m_horizontalAutoCount = state.horizontalCount;
+	m_verticalAutoCount = state.verticalCount;
+	m_horizontalAutoGap = state.horizontalGap;
+	m_verticalAutoGap = state.verticalGap;
+	m_horizontalAutoRefer = state.horizontalRefer;
+	m_verticalAutoRefer = state.verticalRefer;
+	gx = state.gx;
+	gy = state.gy;
+	gw = state.gw;
+	gh = state.gh;
+}
+
 void GuideManagerCore::setPage(ScPage *p)
 {
 	m_page = p;
@@ -137,7 +180,8 @@
 	switch (type)
 	{
 		case Standard:
-			m_horizontalStdG.removeAt(m_horizontalStdG.indexOf(value));
+			if (!m_horizontalStdG.removeOne(value))
+				return;
 			if (UndoManager::undoEnabled())
 			{
 				auto* ss = new SimpleState(Um::DelHGuide, nullptr, Um::IGuides);
@@ -155,7 +199,8 @@
 	switch (type)
 	{
 		case Standard:
-			m_verticalStdG.removeAt(m_verticalStdG.indexOf(value));
+			if (!m_verticalStdG.removeOne(value))
+				return;
 			if (UndoManager::undoEnabled())
 			{
 				auto* ss = new SimpleState(Um::DelVGuide, nullptr, Um::IGuides);
@@ -383,7 +428,19 @@
 	switch (type)
 	{
 		case Standard:
-			m_horizontalStdG.removeAt(m_horizontalStdG.indexOf(from));
+			if (from == to || !m_horizontalStdG.removeOne(from))
+				return;
+			if (m_horizontalStdG.contains(to))
+			{
+				// Preserve the destination guide; Undo restores the removed source.
+				if (UndoManager::undoEnabled())
+				{
+					auto* ss = new SimpleState(QObject::tr("Merge horizontal guides"), nullptr, Um::IGuides);
+					ss->set("REMOVE_H", from);
+					m_undoManager->action(m_page, ss);
+				}
+				return;
+			}
 			m_horizontalStdG.append(to);
 			if (UndoManager::undoEnabled())
 			{
@@ -403,7 +460,19 @@
 	switch (type)
 	{
 		case Standard:
-			m_verticalStdG.removeAt(m_verticalStdG.indexOf(from));
+			if (from == to || !m_verticalStdG.removeOne(from))
+				return;
+			if (m_verticalStdG.contains(to))
+			{
+				// Preserve the destination guide; Undo restores the removed source.
+				if (UndoManager::undoEnabled())
+				{
+					auto* ss = new SimpleState(QObject::tr("Merge vertical guides"), nullptr, Um::IGuides);
+					ss->set("REMOVE_V", from);
+					m_undoManager->action(m_page, ss);
+				}
+				return;
+			}
 			m_verticalStdG.append(to);
 			if (UndoManager::undoEnabled())
 			{
@@ -483,7 +552,7 @@
 	}
 
 	// all auto
-		p->setPen(color, lineWidth, Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin);
+	p->setPen(color, lineWidth, Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin);
 
 	for (auto guide : m_verticalAutoG)
 		p->drawLine(FPoint(guide, verticalFrom), FPoint(guide, verticalTo));
Index: scribus/guidemanagercore.h
===================================================================
--- scribus/guidemanagercore.h	(revision 27915)
+++ scribus/guidemanagercore.h	(working copy)
@@ -43,6 +43,29 @@
 
 	enum GuideType {Standard, Auto};
 
+	// Page-local guide state used by multi-page Undo/Redo.
+	struct Snapshot
+	{
+		Guides horizontalStandard, verticalStandard, horizontalAuto, verticalAuto;
+		int horizontalCount = 0, verticalCount = 0;
+		double horizontalGap = 0.0, verticalGap = 0.0;
+		int horizontalRefer = 0, verticalRefer = 0;
+		double gx = 0.0, gy = 0.0, gw = 0.0, gh = 0.0;
+
+		bool operator==(const Snapshot& other) const
+		{
+			return horizontalStandard == other.horizontalStandard && verticalStandard == other.verticalStandard &&
+				horizontalAuto == other.horizontalAuto && verticalAuto == other.verticalAuto &&
+				horizontalCount == other.horizontalCount && verticalCount == other.verticalCount &&
+				horizontalGap == other.horizontalGap && verticalGap == other.verticalGap &&
+				horizontalRefer == other.horizontalRefer && verticalRefer == other.verticalRefer &&
+				gx == other.gx && gy == other.gy && gw == other.gw && gh == other.gh;
+		}
+	};
+
+	Snapshot snapshot() const;
+	void restoreSnapshot(const Snapshot& state, GuideType type);
+
 	void addHorizontal(double value, GuideType type);
 	void addHorizontals(Guides values, GuideType type);
 	void addVertical(double value, GuideType type);
Index: scribus/guidesmodel.h
===================================================================
--- scribus/guidesmodel.h	(revision 27915)
+++ scribus/guidesmodel.h	(working copy)
@@ -36,6 +36,7 @@
 		void removeValues(const Guides & guides);
 		int insertRow();
 		void discardPendingRow();
+		bool isPendingRow(int row) const { return row == m_pendingRow; }
 
 		//! \brief Set new values into the model.
 		void setValues(const Guides& values);
Index: scribus/scpage.cpp
===================================================================
--- scribus/scpage.cpp	(revision 27915)
+++ scribus/scpage.cpp	(working copy)
@@ -146,7 +146,21 @@
 	auto* ss = dynamic_cast<SimpleState*>(state);
 	if (!ss)
 		return;
-	if (ss->contains("ADD_V"))
+	if (ss->contains("GUIDE_PAGE_STATE"))
+	{
+		using GuidePair = QPair<GuideManagerCore::Snapshot, GuideManagerCore::Snapshot>;
+		auto* guideState = dynamic_cast<ScItemState<GuidePair>*>(ss);
+		if (!guideState)
+			return;
+		const GuidePair states = guideState->getItem();
+		const auto type = static_cast<GuideManagerCore::GuideType>(ss->getInt("GUIDE_PAGE_TYPE"));
+		guides.restoreSnapshot(isUndo ? states.first : states.second, type);
+		if (m_Doc->currentPage() == this)
+			m_Doc->scMW()->guidePalette->setupGui();
+		// Repaint this page without redrawing the entire canvas for each Undo state.
+		m_Doc->regionsChanged()->update(bleedRect());
+	}
+	else if (ss->contains("ADD_V"))
 	{
 		double position = ss->getDouble("ADD_V");
 		if (isUndo)
Index: scribus/ui/guidemanager.cpp
===================================================================
--- scribus/ui/guidemanager.cpp	(revision 27915)
+++ scribus/ui/guidemanager.cpp	(working copy)
@@ -22,6 +22,8 @@
  *																	   *
  ***************************************************************************/
 
+#include <utility>
+
 #include <QEvent>
 #include <QMetaObject>
 #include <QSignalBlocker>
@@ -37,6 +39,7 @@
 #include "scribusview.h"
 #include "selection.h"
 #include "undomanager.h"
+#include "undostate.h"
 #include "units.h"
 
 GuideManager::GuideManager(QWidget* parent) :
@@ -372,58 +375,66 @@
 	qobject_cast<GuidesVDelegate*>(verticalView->itemDelegateForColumn(0))->setDoc(m_doc);
 }
 
-
+void GuideManager::deleteSelectedGuides(GuidesView* view, GuidesModel* model, bool horizontal)
+{
+	if (!currentPage)
+		return;
+	finishGuideEditors();
+	discardPendingGuide(horizontal);
+	const QModelIndexList indexes = view->selectionModel()->selectedRows(0);
+	if (indexes.isEmpty())
+		return;
+
+	Guides selected;
+	Guides committed;
+	const Guides existing = horizontal ? currentPage->guides.horizontals(GuideManagerCore::Standard)
+	                                   : currentPage->guides.verticals(GuideManagerCore::Standard);
+	for (const QModelIndex& ix : indexes)
+	{
+		if (model->isPendingRow(ix.row()))
+			continue;
+		const double position = model->data(ix, Qt::UserRole).toDouble();
+		if (selected.contains(position))
+			continue;
+		selected.append(position);
+		if (existing.contains(position))
+			committed.append(position);
+	}
+	if (selected.isEmpty())
+		return;
+
+	UndoTransaction trans;
+	if (committed.count() > 1 && UndoManager::undoEnabled())
+		trans = UndoManager::instance()->beginTransaction(currentPage->getUName(), currentPage->getUPixmap(),
+		                                                 horizontal ? tr("Remove horizontal guides") : tr("Remove vertical guides"),
+		                                                 "", Um::IGuides);
+	for (double position : std::as_const(committed))
+	{
+		if (horizontal)
+			currentPage->guides.deleteHorizontal(position, GuideManagerCore::Standard);
+		else
+			currentPage->guides.deleteVertical(position, GuideManagerCore::Standard);
+	}
+	if (trans)
+		trans.commit();
+
+	model->removeValues(selected);
+	updateClearButtons();
+	if (!committed.isEmpty())
+	{
+		drawGuides();
+		m_doc->changed();
+	}
+}
 
 void GuideManager::deleteHorizontalButton_clicked()
 {
-	if (!currentPage)
-		return;
-	finishGuideEditors();
-	discardPendingGuide(true);
-	const QModelIndexList indexes = horizontalView->selectionModel()->selectedRows(0);
-	Guides v;
-
-	if (indexes.isEmpty())
-		return;
-	for (const QModelIndex& ix : indexes)
-		// here *must* go EditRole due truncations in DisplayRole
-		// see GuidesModel::data()
-		v.append(horizontalModel->data(ix, Qt::UserRole).toDouble());
-
-	horizontalModel->removeValues(v);
-
-	currentPage->guides.clearHorizontals(GuideManagerCore::Standard);
-	currentPage->guides.addHorizontals(horizontalModel->values(), GuideManagerCore::Standard);
-	drawGuides();
-	m_doc->changed();
-
-	updateClearButtons();
+	deleteSelectedGuides(horizontalView, horizontalModel, true);
 }
 
 void GuideManager::deleteVerticalButton_clicked()
 {
-	if (!currentPage)
-		return;
-	finishGuideEditors();
-	discardPendingGuide(false);
-	const QModelIndexList indexes = verticalView->selectionModel()->selectedRows(0);
-	Guides v;
-
-	if (indexes.isEmpty())
-		return;
-	for (const QModelIndex& ix : indexes)
-		// here *must* go EditRole due truncations in DisplayRole
-		// see GuidesModel::data()
-		v.append(verticalModel->data(ix, Qt::UserRole).toDouble());
-
-	verticalModel->removeValues(v);
-
-	currentPage->guides.clearVerticals(GuideManagerCore::Standard);
-	currentPage->guides.addVerticals(verticalModel->values(), GuideManagerCore::Standard);
-	drawGuides();
-	m_doc->changed();
-
-	updateClearButtons();
+	deleteSelectedGuides(verticalView, verticalModel, false);
 }
 
 void GuideManager::clearHorizontalButton_clicked()
@@ -517,29 +528,70 @@
 	m_doc->lockGuides(lockGuidesButton->isChecked());
 }
 
-void GuideManager::copyGuidesToAllPages(GuideManagerCore::GuideType t)
-{
-	QListIterator<ScPage*> it(*m_doc->Pages);
-	ScPage *tmpPage;
-	while (it.hasNext())
-	{
-		tmpPage = it.next();
-		if (tmpPage->pageNr() == currentPage->pageNr())
+void GuideManager::copyGuidesToAllPages(GuideManagerCore::GuideType type)
+{
+	if (!m_doc || !currentPage || m_doc->Pages->count() < 2)
+		return;
+
+	if (type == GuideManagerCore::Auto)
+		storePageValues(currentPage);
+	const auto source = currentPage->guides.snapshot();
+	UndoTransaction transaction;
+	bool changed = false;
+	for (ScPage* page : *m_doc->Pages)
+	{
+		if (page == currentPage)
 			continue;
-		tmpPage->guides.clearHorizontals(t);
-		tmpPage->guides.clearVerticals(t);
-		switch (t)
+
+		const auto before = page->guides.snapshot();
+		auto target = before;
+		if (type == GuideManagerCore::Standard)
 		{
-			case GuideManagerCore::Standard:
-				currentPage->guides.copy(&tmpPage->guides, t);
-				break;
-			case GuideManagerCore::Auto:
-				storePageValues(tmpPage);
-				break;
+			target.horizontalStandard = source.horizontalStandard;
+			target.verticalStandard = source.verticalStandard;
 		}
-	}
-	drawGuides();
-	m_doc->changed();
+		else
+		{
+			target.horizontalCount = source.horizontalCount;
+			target.verticalCount = source.verticalCount;
+			target.horizontalGap = source.horizontalGap;
+			target.verticalGap = source.verticalGap;
+			target.horizontalRefer = source.horizontalRefer;
+			target.verticalRefer = source.verticalRefer;
+			target.gx = source.gx;
+			target.gy = source.gy;
+			target.gw = source.gw;
+			target.gh = source.gh;
+		}
+		page->guides.restoreSnapshot(target, type);
+		if (type == GuideManagerCore::Auto)
+		{
+			page->guides.addHorizontals(page->guides.getAutoHorizontals(page), GuideManagerCore::Auto);
+			page->guides.addVerticals(page->guides.getAutoVerticals(page), GuideManagerCore::Auto);
+		}
+		const auto after = page->guides.snapshot();
+		if (before == after)
+			continue;
+		if (!changed && UndoManager::undoEnabled())
+			transaction = UndoManager::instance()->beginTransaction(m_doc->getUName(), m_doc->getUPixmap(),
+				type == GuideManagerCore::Standard ? tr("Apply manual guides to all pages")
+				                                   : tr("Apply rows and columns to all pages"), "", Um::IGuides);
+		if (UndoManager::undoEnabled())
+		{
+			using GuidePair = QPair<GuideManagerCore::Snapshot, GuideManagerCore::Snapshot>;
+			auto* state = new ScItemState<GuidePair>(tr("Apply guides to page"), nullptr, Um::IGuides);
+			state->set("GUIDE_PAGE_STATE", true);
+			state->set("GUIDE_PAGE_TYPE", static_cast<int>(type));
+			state->setItem(qMakePair(before, after));
+			UndoManager::instance()->action(page, state);
+		}
+		changed = true;
+		m_doc->regionsChanged()->update(page->bleedRect());
+	}
+	if (transaction)
+		transaction.commit();
+	if (changed)
+		m_doc->changed();
 }
 
 void GuideManager::applyToAllPagesButton_clicked()
Index: scribus/ui/guidemanager.h
===================================================================
--- scribus/ui/guidemanager.h	(revision 27915)
+++ scribus/ui/guidemanager.h	(working copy)
@@ -16,6 +16,7 @@
 #include "scpage.h"
 
 class GuidesModel;
+class GuidesView;
 class ScribusDoc;
 class QToolButton;
 
@@ -109,6 +110,7 @@
 	/*! \brief Refresh the canvas guides. */
 	void drawGuides();
 	void guideValueChanged(bool horizontal, double oldPosition, double newPosition);
+	void deleteSelectedGuides(GuidesView* view, GuidesModel* model, bool horizontal);
 	void addGuide(bool horizontal, double position);
 	void setAddButtonEditing(QToolButton* button, bool editing, bool horizontal);
 	void discardPendingGuide(bool horizontal);

Issue History

Date Modified Username Field Change
2026-10-20 11:06 buttar New Issue
2026-10-20 11:06 buttar File Added: gmu3-guide-history-correctness-v1.00.patch
2026-10-20 11:12 buttar Note Added: 0054574
2026-10-20 11:12 buttar File Added: spurious-guide-del-history-entry.mp4
2026-10-24 06:07 ale Relationship added related to 0018025
2026-10-26 12:57 buttar Note Added: 0054617
2026-10-26 12:57 buttar File Added: gmr2-guide-operations-correctness-v1.02.patch