View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0018062 | Scribus | Text Frames / Story Editor | public | 2026-11-04 14:14 | 2026-11-04 22:03 |
| Reporter | buttar | Assigned To | cbradney | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Platform | Linux | OS | Fedora Workstation | OS Version | 44 |
| Fixed in Version | 1.7.5.svn | ||||
| Summary | 0018062: Fix false document modification when adjusting text frame height | ||||
| Description | # Issue - Adjust Frame Height to Text can mark the document as modified even when the command makes no change to the frame's height. - This can unnecessarily trigger a save prompt when closing the document. # Fix - Only notifies the document of a change when a frame is actually resized. - Avoids unnecessary UI updates for no-op operations. - Preserves existing resize and Undo/Redo behaviour. | ||||
| Tags | No tags attached. | ||||
| Attached Files | adjust-frame-height-noop-state-v1.00.patch (1,159 bytes)
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp (revision 27933)
+++ scribus/scribusdoc.cpp (working copy)
@@ -16897,20 +16897,27 @@
UndoTransaction trans;
if (UndoManager::undoEnabled())
trans = m_undoManager->beginTransaction(Um::Selection, Um::ITextFrame, Um::Resize,"", Um::IResize);
+ bool resized = false;
for (int i = 0; i < selectedItemCount; ++i)
{
PageItem *currItem = itemSelection->itemAt(i);
if (currItem != nullptr)
{
if (currItem->isTextFrame() && (currItem->itemText.isNotEmpty()) && !currItem->isTableItem)
- currItem ->asTextFrame()->setTextFrameHeight();
+ {
+ const double oldHeight = currItem->height();
+ currItem->asTextFrame()->setTextFrameHeight();
+ resized |= !qFuzzyCompare(oldHeight, currItem->height());
+ }
}
}
if (trans)
trans.commit();
- regionsChanged()->update(QRectF());
- changed();
- itemSelection->itemAt(0)->emitAllToGUI();
+ if (resized)
+ {
+ regionsChanged()->update(QRectF());
+ itemSelection->itemAt(0)->emitAllToGUI();
+ }
}
void ScribusDoc::itemSelection_AdjustTableRowHeights()
| ||||
| Patch | Yes | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-04 14:14 | buttar | New Issue | |
| 2026-11-04 14:14 | buttar | File Added: adjust-frame-height-noop-state-v1.00.patch | |
| 2026-11-04 20:37 | cbradney | Assigned To | => cbradney |
| 2026-11-04 20:37 | cbradney | Status | new => resolved |
| 2026-11-04 20:37 | cbradney | Resolution | open => fixed |
| 2026-11-04 20:37 | cbradney | Fixed in Version | => 1.7.5.svn |
| 2026-11-04 20:38 | cbradney | Note Added: 0054650 | |
| 2026-11-04 22:03 | jghali | Summary | [tiny patch] Fix false document modification when adjusting text frame height => Fix false document modification when adjusting text frame height |