View Issue Details

IDProjectCategoryView StatusLast Update
0018014ScribusImport / Exportpublic2026-10-17 20:07
Reporterbuttar Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSFedora WorkstationOS Version44
Product Version1.7.4.svn 
Fixed in Version1.7.4.svn 
Summary0018014: Fix spurious move/undo actions after page import
Description- Selecting an imported frame incorrectly records a Move action in Action History, even though the frame hasn't moved.
- Undo/Redo can subsequently displace imported objects.

Fix:
- Baseline: r27881.
- Synchronise imported items' position, size and page-ownership undo baselines after placement.
- Include imported group children.
- Preserve normal Move/Resize tracking and Undo/Redo behaviour.
Steps To Reproduce1. Import pages containing text/image frames into another document.
2. Click an imported frame to select it without moving it.
3. Observe a spurious Move entry in Action History.
4. Undo the action; the frame may shift position.
Tags#please_test
Attached Files
imported-item-undo-state.png (296,477 bytes)   
imported-item-undo-state.png (296,477 bytes)   
pim1-imported-item-undo-state-v1.01.patch (1,417 bytes)   
Index: scribus/pageitem.h
===================================================================
--- scribus/pageitem.h	(revision 27881)
+++ scribus/pageitem.h	(working copy)
@@ -1201,6 +1201,9 @@
 	 * @author Riku Leino
 	 */
 	void checkChanges(bool force = false);
+	// Sync undo baselines after import placement.
+	void syncImportedGeometryUndoState();
+
 	/**
 	 * @name Store undo actions
 	 * @brief Add an undo action to the undo guis
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp	(revision 27881)
+++ scribus/pageitem.cpp	(working copy)
@@ -4619,6 +4619,15 @@
 	m_layerID = newLayerID;
 }
 
+void PageItem::syncImportedGeometryUndoState()
+{
+	oldXpos = m_xPos;
+	oldYpos = m_yPos;
+	oldWidth = m_width;
+	oldHeight = m_height;
+	oldOwnPage = OwnPage;
+}
+
 void PageItem::checkChanges(bool force)
 {
 	if (m_Doc->view() == nullptr)
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 27881)
+++ scribus/scribus.cpp	(working copy)
@@ -3382,6 +3382,9 @@
 	for (int i = oldItemsCount; i < docItemsCount; ++i)
 	{
 		PageItem *ite = doc->Items->at(i);
+		ite->syncImportedGeometryUndoState();
+		for (PageItem* child : ite->getAllChildren())
+			child->syncImportedGeometryUndoState();
 		if ((ite->isTextFrame()) && (ite->isBookmark))
 			AddBookMark(ite);
 	}
PatchYes

Relationships

related to 0017942 closedcbradney 'Group/move/ungroup/move' undo issue 

Activities

cbradney

2026-10-14 18:57

administrator   ~0054527

Thanks, fixed, similarly but not 100% the same

Issue History

Date Modified Username Field Change
2026-10-14 16:14 buttar New Issue
2026-10-14 16:14 buttar Tag Attached: #please_test
2026-10-14 16:14 buttar File Added: imported-item-undo-state.png
2026-10-14 16:14 buttar File Added: pim1-imported-item-undo-state-v1.01.patch
2026-10-14 18:57 cbradney Assigned To => cbradney
2026-10-14 18:57 cbradney Status new => resolved
2026-10-14 18:57 cbradney Resolution open => fixed
2026-10-14 18:57 cbradney Fixed in Version => 1.7.4.svn
2026-10-14 18:57 cbradney Note Added: 0054527
2026-10-14 19:09 cbradney Relationship added related to 0017942
2026-10-14 20:25 jghali Summary [patch] Fix spurious move/undo actions after page import => Fix spurious move/undo actions after page import
2026-10-17 20:07 cbradney Status resolved => closed