r23344 by jghali - Fix table borders not being updated according to current cell selection
scribus-commit
scribus-commit at lists.scribus.net
Fri Nov 8 02:49:13 UTC 2019
Author: jghali
Date: Fri Nov 8 02:49:13 2019
New Revision: 23344
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23344
Log:
Fix table borders not being updated according to current cell selection
Modified:
trunk/Scribus/scribus/ui/propertiespalette_table.cpp
Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23344&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp Fri Nov 8 02:49:13 2019
@@ -612,16 +612,24 @@
}
else
{
- TableCell cell = table->activeCell();
- if (selectedSides & TableSideSelector::Left)
- cell.setLeftBorder(m_currentBorder);
- if (selectedSides & TableSideSelector::Right)
- cell.setRightBorder(m_currentBorder);
- if (selectedSides & TableSideSelector::Top)
- cell.setTopBorder(m_currentBorder);
- if (selectedSides & TableSideSelector::Bottom)
- cell.setBottomBorder(m_currentBorder);
- }
+ QSet<TableCell> cells = table->selectedCells();
+ if (cells.isEmpty())
+ cells.insert(table->activeCell());
+ QSet<TableCell>::Iterator cellIter;
+ for (cellIter = cells.begin(); cellIter != cells.end(); cellIter++)
+ {
+ TableCell currentCell(*cellIter);
+ if (selectedSides & TableSideSelector::Left)
+ currentCell.setLeftBorder(m_currentBorder);
+ if (selectedSides & TableSideSelector::Right)
+ currentCell.setRightBorder(m_currentBorder);
+ if (selectedSides & TableSideSelector::Top)
+ currentCell.setTopBorder(m_currentBorder);
+ if (selectedSides & TableSideSelector::Bottom)
+ currentCell.setBottomBorder(m_currentBorder);
+ }
+ }
+
table->adjustTable();
table->update();
}
More information about the scribus-commit
mailing list