r14990 by jghali - #9031 : tabs can't be changed in edit mode using tab manager widget in PP The tab manager did not work consistently compared to other text settings and acted only story default style. Now when in edit mode it acts on current style/selection like other text settings do.
scribus-commit
scribus-commit at lists.scribus.net
Mon Apr 19 23:10:39 CEST 2010
Revision: 14990
Author: jghali
Date: 2010-04-19T21:06:46.391041Z
Commit message: #9031 : tabs can't be changed in edit mode using tab manager widget in PP
The tab manager did not work consistently compared to other text settings and acted only story default style. Now when in edit mode it acts on current style/selection like other text settings do.
Changeset:
M /trunk/Scribus/scribus/ui/propertiespalette.cpp
Diffs:
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp (revision 14989)
+++ scribus/ui/propertiespalette.cpp (revision 14990)
@@ -4670,12 +4670,22 @@
PageItem_TextFrame *i2=CurItem->asTextFrame();
if (i2==0)
return;
- TabManager *dia = new TabManager(this, doc->unitIndex(), i2->itemText.defaultStyle().tabValues(), i2->columnWidth());
+ const ParagraphStyle& style(doc->appMode == modeEdit ? i2->currentStyle() : i2->itemText.defaultStyle());
+ TabManager *dia = new TabManager(this, doc->unitIndex(), style.tabValues(), i2->columnWidth());
if (dia->exec())
{
- ParagraphStyle newStyle(CurItem->itemText.defaultStyle());
- newStyle.setTabValues(dia->tmpTab);
- CurItem->itemText.setDefaultStyle(newStyle);
+ if (doc->appMode != modeEdit)
+ {
+ ParagraphStyle newStyle(CurItem->itemText.defaultStyle());
+ newStyle.setTabValues(dia->tmpTab);
+ CurItem->itemText.setDefaultStyle(newStyle);
+ }
+ else
+ {
+ ParagraphStyle newStyle;
+ newStyle.setTabValues(dia->tmpTab);
+ doc->itemSelection_ApplyParagraphStyle(newStyle);
+ }
CurItem->update();
emit DocChanged();
}
More information about the scribus-commit
mailing list