diff --git a/limereport/items/editors/lrfonteditorwidget.cpp b/limereport/items/editors/lrfonteditorwidget.cpp index be54949..5d1a306 100644 --- a/limereport/items/editors/lrfonteditorwidget.cpp +++ b/limereport/items/editors/lrfonteditorwidget.cpp @@ -158,7 +158,6 @@ void FontEditorWidgetForPage::slotFontAttribsChanged(bool value) #ifdef HAVE_REPORT_DESIGNER void FontEditorWidgetForDesigner::initEditor() { - FontEditorWidget::initEditor(); connect(m_reportEditor,SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant)), this,SLOT(slotPropertyChanged(QString,QString,QVariant,QVariant))); } diff --git a/limereport/items/editors/lrfonteditorwidget.h b/limereport/items/editors/lrfonteditorwidget.h index d319ff0..f8f9b96 100644 --- a/limereport/items/editors/lrfonteditorwidget.h +++ b/limereport/items/editors/lrfonteditorwidget.h @@ -51,7 +51,7 @@ public: protected: void setItemEvent(BaseDesignIntf *item); QFontComboBox* fontNameEditor(){return m_fontNameEditor;} - virtual void initEditor(); + void initEditor(); protected slots: virtual void slotFontChanged(const QFont&); virtual void slotFontSizeChanged(const QString& value); @@ -94,7 +94,7 @@ class FontEditorWidgetForDesigner : public FontEditorWidget{ Q_OBJECT public: explicit FontEditorWidgetForDesigner(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0) - : FontEditorWidget(title, parent), m_reportEditor(reportEditor){} + : FontEditorWidget(title, parent), m_reportEditor(reportEditor){initEditor();} protected: void initEditor(); diff --git a/limereport/items/editors/lrtextalignmenteditorwidget.cpp b/limereport/items/editors/lrtextalignmenteditorwidget.cpp index 8eb424b..8874d13 100644 --- a/limereport/items/editors/lrtextalignmenteditorwidget.cpp +++ b/limereport/items/editors/lrtextalignmenteditorwidget.cpp @@ -197,7 +197,6 @@ void TextAlignmentEditorWidgetForPage::slotTextVAttribsChanged(bool value) #ifdef HAVE_REPORT_DESIGNER void TextAlignmentEditorWidgetForDesigner::initEditor() { - TextAlignmentEditorWidget::initEditor(); connect(m_reportEditor,SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant)), this,SLOT(slotPropertyChanged(QString,QString,QVariant,QVariant))); diff --git a/limereport/items/editors/lrtextalignmenteditorwidget.h b/limereport/items/editors/lrtextalignmenteditorwidget.h index 97f13f5..4590be3 100644 --- a/limereport/items/editors/lrtextalignmenteditorwidget.h +++ b/limereport/items/editors/lrtextalignmenteditorwidget.h @@ -45,7 +45,7 @@ public: int flag() const; protected: void setItemEvent(BaseDesignIntf *item); - virtual void initEditor(); + void initEditor(); bool m_textAttibutesIsChanging; private: void updateValues(const Qt::Alignment& align); @@ -84,7 +84,7 @@ class TextAlignmentEditorWidgetForDesigner: public TextAlignmentEditorWidget{ Q_OBJECT public: TextAlignmentEditorWidgetForDesigner(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0) - :TextAlignmentEditorWidget(title, parent), m_reportEditor(reportEditor){} + :TextAlignmentEditorWidget(title, parent), m_reportEditor(reportEditor){initEditor();} protected: void initEditor(); protected slots: diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index 63d856f..9e559cd 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -971,7 +971,7 @@ void TextItem::setTextItemFont(QFont value) if (font()!=value){ QFont oldValue = font(); setFont(value); - update(); + if (!isLoading()) update(); notify("font",oldValue,value); } } diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 0dbea41..43ceb68 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -164,8 +164,10 @@ QFont BaseDesignIntf::font() const void BaseDesignIntf::setFont(QFont &font) { - m_font = font; - update(); + if (m_font != font){ + m_font = font; + if (!isLoading()) update(); + } } qreal BaseDesignIntf::width() const diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index c89fc83..d46d507 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -480,7 +480,7 @@ void ReportEnginePrivate::printToFile(const QString &fileName) bool ReportEnginePrivate::printToPDF(const QString &fileName) { - return exportReport("PDF"); + return exportReport("PDF", fileName); } bool ReportEnginePrivate::exportReport(QString exporterName, const QString &fileName, const QMap ¶ms)