View Issue Details

IDProjectCategoryView StatusLast Update
0017341ScribusGeneralpublic2024-12-16 21:12
Reporternitramr Assigned Tonitramr  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformDesktop PCOSUbuntuOS Version24.10 64-bit
Product Version1.7.0.svn 
Target Version1.7.0Fixed in Version1.7.0.svn 
Summary0017341: Crash when you change first line offset of a table text frame
DescriptionScribus crashes when you change the first line offset of a text frame inside a table.
Steps To Reproduce1. Create a new document
2. Create a table (set any row or column)
3. Double click on any text frame inside the table
4. Change first line offset in text properties palette (F4) -> Alignment
TagsNo tags attached.
PatchYes

Activities

nitramr

2024-12-15 19:43

developer  

tableflop_2024-12-15_01.patch (1,641 bytes)   
Index: scribus/ui/propertywidget_alignment.cpp
===================================================================
--- scribus/ui/propertywidget_alignment.cpp	(Revision 26493)
+++ scribus/ui/propertywidget_alignment.cpp	(Arbeitskopie)
@@ -334,20 +334,28 @@
 {
 	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	if (radioFlop == FlopWidget::RealHeightID)
-		m_item->setFirstLineOffset(FLOPRealGlyphHeight);
-	else if (radioFlop == FlopWidget::FontAscentID)
-		m_item->setFirstLineOffset(FLOPFontAscent);
-	else if (radioFlop == FlopWidget::LineSpacingID)
-		m_item->setFirstLineOffset(FLOPLineSpacing);
-	else if (radioFlop == FlopWidget::BaselineGridID)
-		m_item->setFirstLineOffset(FLOPBaselineGrid);
-	m_item->update();
+
+	PageItem *textItem = m_item;
 	if (m_doc->appMode == modeEditTable)
-		m_item->parentTable()->update();
-	else
-		m_item->update();
-	m_doc->regionsChanged()->update(QRect());
+		textItem = m_item->asTable()->activeCell().textFrame();
+
+	if (textItem != nullptr)
+	{
+		if (radioFlop == FlopWidget::RealHeightID)
+			textItem->setFirstLineOffset(FLOPRealGlyphHeight);
+		else if (radioFlop == FlopWidget::FontAscentID)
+			textItem->setFirstLineOffset(FLOPFontAscent);
+		else if (radioFlop == FlopWidget::LineSpacingID)
+			textItem->setFirstLineOffset(FLOPLineSpacing);
+		else if (radioFlop == FlopWidget::BaselineGridID)
+			textItem->setFirstLineOffset(FLOPBaselineGrid);
+		textItem->update();
+
+		if (m_doc->appMode == modeEditTable)
+			m_item->asTable()->update();
+
+		m_doc->regionsChanged()->update(QRect());
+	}
 }
 
 void PropertyWidget_Alignment::handleOpticalMargins()
tableflop_2024-12-15_01.patch (1,641 bytes)   

Issue History

Date Modified Username Field Change
2024-12-15 19:43 nitramr New Issue
2024-12-15 19:43 nitramr File Added: tableflop_2024-12-15_01.patch
2024-12-15 20:45 cbradney Assigned To => nitramr
2024-12-15 20:45 cbradney Status new => resolved
2024-12-15 20:45 cbradney Resolution open => fixed
2024-12-15 20:45 cbradney Fixed in Version => 1.7.0.svn
2024-12-16 21:12 cbradney Status resolved => closed