Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f5ad0806 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 0214c0a6
......@@ -493,10 +493,6 @@ void KNote::print(bool preview)
if ( isModified() ) {
saveNote();
}
KNotePrinter printer;
QList<KNotePrintObject*> lst;
lst.append(new KNotePrintObject(mItem));
printer.setDefaultFont( mDisplayAttribute->font() );
KNotesGlobalConfig *globalConfig = KNotesGlobalConfig::self();
QString printingTheme = globalConfig->theme();
......@@ -508,6 +504,10 @@ void KNote::print(bool preview)
delete dlg;
}
if (!printingTheme.isEmpty()) {
KNotePrinter printer;
QList<KNotePrintObject*> lst;
lst.append(new KNotePrintObject(mItem));
printer.setDefaultFont( mDisplayAttribute->font() );
printer.printNotes( lst, printingTheme, preview );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment