r17099 by jghali - remove DocChanged() calls emitted from PP :
scribus-commit
scribus-commit at lists.scribus.net
Sun Dec 18 12:27:12 UTC 2011
Author: jghali
Date: Sun Dec 18 12:27:12 2011
New Revision: 17099
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17099
Log:
remove DocChanged() calls emitted from PP :
- the proper way to mark doc as changed is now to call ScribusDoc::changed() (which will trigger slotDocCh() as DocChanged() previously did it)
- DocChanged() was triggering duplicate calls to slotDocCh() in case PageItem::update() was used too
Modified:
trunk/Scribus/scribus/ui/propertiespalette.cpp
trunk/Scribus/scribus/ui/propertiespalette.h
trunk/Scribus/scribus/ui/propertiespalette_group.cpp
trunk/Scribus/scribus/ui/propertiespalette_group.h
trunk/Scribus/scribus/ui/propertiespalette_image.cpp
trunk/Scribus/scribus/ui/propertiespalette_image.h
trunk/Scribus/scribus/ui/propertiespalette_line.cpp
trunk/Scribus/scribus/ui/propertiespalette_line.h
trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
trunk/Scribus/scribus/ui/propertiespalette_shape.h
trunk/Scribus/scribus/ui/propertiespalette_text.cpp
trunk/Scribus/scribus/ui/propertiespalette_text.h
trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
trunk/Scribus/scribus/ui/propertiespalette_xyz.h
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Sun Dec 18 12:27:12 2011
@@ -243,7 +243,6 @@
this->textPal->setMainWindow(mw);
this->tablePal->setMainWindow(mw);
- connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
//connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
//connect(this->Cpal, SIGNAL(strokeGradientChanged()), m_ScMW, SLOT(updtGradStroke()));
connect(this->Tpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradMask()));
@@ -793,7 +792,7 @@
}
upRect.translate(m_item->xPos(), m_item->yPos());
m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
- emit DocChanged();
+ m_doc->changed();
}
}
@@ -866,7 +865,7 @@
upRect |= QRectF(shP, QPointF(m_item->width(), m_item->height())).normalized();
upRect.translate(m_item->xPos(), m_item->yPos());
m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
- emit DocChanged();
+ m_doc->changed();
}
}
Modified: trunk/Scribus/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.h Sun Dec 18 12:27:12 2011
@@ -113,9 +113,6 @@
void toggleGradientEditM();
void handleShapeEdit();
-signals:
- void DocChanged();
-
protected:
ScribusMainWindow *m_ScMW;
Modified: trunk/Scribus/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.cpp Sun Dec 18 12:27:12 2011
@@ -128,7 +128,6 @@
m_ScMW = mw;
connect(this->transPalWidget, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradMaskGroup()));
- connect(this , SIGNAL(DocChanged()) , m_ScMW, SLOT(slotDocCh()));
connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
}
@@ -411,7 +410,6 @@
{
m_item->setFillTransparency(trans);
m_item->update();
- emit DocChanged();
}
}
@@ -421,7 +419,6 @@
{
m_item->setFillBlendmode(blend);
m_item->update();
- emit DocChanged();
}
}
@@ -433,7 +430,6 @@
if ((typ > 0) && (typ < 7))
m_item->updateGradientVectors();
m_item->update();
- emit DocChanged();
}
}
@@ -443,7 +439,6 @@
{
m_item->setPatternMask(pattern);
m_item->update();
- emit DocChanged();
}
}
@@ -454,7 +449,6 @@
m_item->setMaskTransform(imageScaleX, imageScaleY, offsetX, offsetY, rotation, skewX, skewY);
m_item->setMaskFlip(mirrorX, mirrorY);
m_item->update();
- emit DocChanged();
}
}
@@ -499,7 +493,7 @@
mode = PageItem::TextFlowUsesImageClipping;
}
m_item->setTextFlowMode(mode);
- emit DocChanged();
+ m_doc->changed();
m_doc->invalidateAll();
m_doc->regionsChanged()->update(QRect());
}
@@ -556,7 +550,7 @@
upRect |= QRectF(shP, QPointF(m_item->width(), m_item->height())).normalized();
upRect.translate(m_item->xPos(), m_item->yPos());
m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
- emit DocChanged();
+ m_doc->changed();
}
}
@@ -566,7 +560,6 @@
return;
m_item->fillRule = evenOdd->isChecked();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Group::handleShapeEdit()
Modified: trunk/Scribus/scribus/ui/propertiespalette_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_group.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.h Sun Dec 18 12:27:12 2011
@@ -84,7 +84,6 @@
void handleGradientEdit();
signals:
- void DocChanged();
void shapeChanged(int);
void shapeEditStarted();
};
Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp Sun Dec 18 12:27:12 2011
@@ -122,7 +122,6 @@
{
m_ScMW = mw;
- connect(this , SIGNAL(DocChanged()) , m_ScMW, SLOT(slotDocCh()));
connect(m_ScMW, SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
}
@@ -585,8 +584,8 @@
if ((m_haveDoc) && (m_haveItem))
{
m_item->setImageScalingMode(freeScale->isChecked(), cbProportional->isChecked());
+ m_doc->changed();
emit UpdtGui(PageItem::ImageFrame);
- emit DocChanged();
}
}
@@ -682,7 +681,7 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
m_ScMW->view->editExtendedImageProperties();
- emit DocChanged();
+ m_doc->changed();
}
void PropertiesPalette_Image::handleImagePageNumber()
Modified: trunk/Scribus/scribus/ui/propertiespalette_image.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_image.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.h Sun Dec 18 12:27:12 2011
@@ -103,7 +103,6 @@
void handleExtImgProperties();
signals:
- void DocChanged();
void UpdtGui(int);
};
Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.cpp Sun Dec 18 12:27:12 2011
@@ -122,7 +122,6 @@
{
m_ScMW = mw;
- connect(this , SIGNAL(DocChanged()) , m_ScMW, SLOT(slotDocCh()));
connect(m_ScMW, SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
}
@@ -617,7 +616,6 @@
m_item->RightLine = rightLine->isChecked();
m_item->BottomLine = bottomLine->isChecked();
m_item->update();
- emit DocChanged();
}
}
@@ -661,7 +659,6 @@
m_item->setDashOffset(dashEditor->Offset->value() * m_item->lineWidth());
}
m_item->update();
- emit DocChanged();
}
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_line.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.h Sun Dec 18 12:27:12 2011
@@ -84,7 +84,6 @@
void handleLineStyle(QListWidgetItem *c);
signals:
- void DocChanged();
void lineModeChanged(int);
};
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp Sun Dec 18 12:27:12 2011
@@ -86,7 +86,6 @@
{
m_ScMW = mw;
- connect(this , SIGNAL(DocChanged()) , m_ScMW, SLOT(slotDocCh()));
connect(m_ScMW, SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
}
@@ -413,7 +412,7 @@
mode = PageItem::TextFlowUsesImageClipping;
}
m_item->setTextFlowMode(mode);
- emit DocChanged();
+ m_doc->changed();
m_doc->invalidateAll();
m_doc->regionsChanged()->update(QRect());
}
@@ -447,7 +446,7 @@
roundRect->setEnabled(false);
connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
}
- emit DocChanged();
+ m_doc->changed();
}
}
@@ -471,7 +470,7 @@
return;
m_item->setCornerRadius(roundRect->value() / m_unitRatio);
m_ScMW->view->SetFrameRounded();
- emit DocChanged();
+ m_doc->changed();
m_doc->regionsChanged()->update(QRect());
}
@@ -481,7 +480,6 @@
return;
m_item->fillRule = evenOdd->isChecked();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Shape::handleNewShape(int f, int c, qreal *vals)
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.h Sun Dec 18 12:27:12 2011
@@ -80,9 +80,6 @@
void handleCornerRadius();
void handleFillRule();
void handleNewShape(int, int, qreal *);
-
-signals:
- void DocChanged();
};
#endif
Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp Sun Dec 18 12:27:12 2011
@@ -140,7 +140,6 @@
advancedWidgets->setMainWindow(mw);
colorWidgets->setMainWindow(mw);
- connect(this , SIGNAL(DocChanged()) , m_ScMW, SLOT(slotDocCh()));
connect(this , SIGNAL(NewAlignment(int)) , m_ScMW, SLOT(setNewAlignment(int)));
connect(this , SIGNAL(NewFont(const QString&)), m_ScMW, SLOT(SetNewFont(const QString&)));
connect(m_ScMW, SIGNAL(UpdateRequest(int)) , this , SLOT(handleUpdateRequest(int)));
@@ -716,7 +715,6 @@
return;
m_item->Cols = distanceWidgets->columns->value();
displayColumns(m_item->Cols, m_item->ColGap);
- m_item->update();
if (distanceWidgets->columns->value() == 1)
{
distanceWidgets->columnGap->setEnabled(false);
@@ -727,7 +725,7 @@
distanceWidgets->columnGap->setEnabled(true);
distanceWidgets->columnGapLabel->setEnabled(true);
}
- emit DocChanged();
+ m_item->update();
}
void PropertiesPalette_Text::handleColumnGap()
@@ -748,7 +746,6 @@
m_item->ColGap = newGap;
}
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Text::handleFontSize()
@@ -778,7 +775,6 @@
m_item->setTextToFrameDist(left, right, top, bottom);
displayColumns(m_item->Cols, m_item->ColGap);
m_item->update();
- emit DocChanged();
}
}
@@ -826,7 +822,6 @@
return;
m_item->textPathType = pathTextWidgets->pathTextType->currentIndex();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Text::handlePathFlip()
@@ -836,7 +831,6 @@
m_item->textPathFlipped = pathTextWidgets->flippedPathText->isChecked();
m_item->updatePolyClip();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Text::handlePathLine()
@@ -845,7 +839,6 @@
return;
m_item->PoShow = pathTextWidgets->showCurveCheckBox->isChecked();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Text::handlePathDist()
@@ -856,7 +849,6 @@
m_doc->AdjustItemSize(m_item);
m_item->updatePolyClip();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Text::handlePathOffs()
@@ -867,7 +859,6 @@
m_doc->AdjustItemSize(m_item);
m_item->updatePolyClip();
m_item->update();
- emit DocChanged();
}
void PropertiesPalette_Text::fillLangCombo(QMap<QString,QString> langMap)
@@ -891,7 +882,7 @@
if ((m_haveDoc) && (m_haveItem))
{
m_item->doc()->setHyphLanguage(m_ScMW->GetLang(langCombo->currentText()));
- emit DocChanged();
+ m_doc->changed();
}
}
@@ -919,7 +910,6 @@
m_doc->itemSelection_ApplyParagraphStyle(newStyle);
}
m_item->update();
- emit DocChanged();
}
delete dia;
}
@@ -991,5 +981,4 @@
else if( radioFlop == PropertyWidget_Flop::LineSpacingID)
m_item->setFirstLineOffset(FLOPLineSpacing);
m_item->update();
- emit DocChanged();
-}
+}
Modified: trunk/Scribus/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_text.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.h Sun Dec 18 12:27:12 2011
@@ -163,7 +163,6 @@
QTreeWidgetItem* pathTextItem;
signals:
- void DocChanged();
void NewAlignment(int);
void NewFont(const QString&);
};
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp Sun Dec 18 12:27:12 2011
@@ -148,7 +148,6 @@
{
m_ScMW = mw;
- connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
connect(mw, SIGNAL(AppModeChanged(int, int)), this, SLOT(handleAppModeChanged(int, int)));
}
@@ -750,7 +749,7 @@
}
}
m_doc->regionsChanged()->update(QRect());
- emit DocChanged();
+ m_doc->changed();
}
}
@@ -831,7 +830,7 @@
}
}
m_doc->regionsChanged()->update(QRect());
- emit DocChanged();
+ m_doc->changed();
}
void PropertiesPalette_XYZ::handleNewW()
@@ -955,7 +954,6 @@
}
m_item->Sizing = oldS;
}
- //emit DocChanged();
m_doc->changed();
m_doc->regionsChanged()->update(QRect());
}
@@ -1082,7 +1080,6 @@
}
m_item->Sizing = oldS;
}
- //emit DocChanged();
m_doc->changed();
m_doc->regionsChanged()->update(QRect());
}
@@ -1111,7 +1108,7 @@
m_doc->m_Selection->itemAt(i)->checkChanges(true);
m_ScMW->view->endGroupTransaction();
}
- emit DocChanged();
+ m_doc->changed();
m_doc->regionsChanged()->update(QRect());
m_oldRotation = rotationSpin->value();
}
@@ -1244,7 +1241,6 @@
{
m_item->AdjustPictScale();
m_item->update();
- emit DocChanged();
}
}
m_haveItem = true;
@@ -1328,7 +1324,7 @@
if (m_item->itemName() != nameEdit->text())
{
m_item->setItemName(nameEdit->text());
- emit DocChanged();
+ m_doc->changed();
}
}
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17099&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.h Sun Dec 18 12:27:12 2011
@@ -94,9 +94,6 @@
void spinboxFinishUserAction();
void updateSpinBoxConstants();
-signals:
- void DocChanged();
-
protected:
ScribusMainWindow *m_ScMW;
More information about the scribus-commit
mailing list