Commit e3d47871 authored by Pino Toscano's avatar Pino Toscano
Browse files

remove the svg item when closing the url

svn path=/trunk/KDE/kdegraphics/svgpart/; revision=814892
parent 702106fe
......@@ -64,7 +64,6 @@ SvgPart::SvgPart(QWidget* parentWidget, QObject* parent, const QVariantList&)
bool SvgPart::openFile() {
delete mItem;
if (!mRenderer->load(localFilePath())) {
return false;
}
......@@ -75,6 +74,13 @@ bool SvgPart::openFile() {
}
bool SvgPart::closeUrl() {
delete mItem;
mItem = 0;
return KParts::ReadOnlyPart::closeUrl();
}
void SvgPart::zoomIn() {
setZoom(zoom() * 2);
}
......
......@@ -33,6 +33,8 @@ class SvgPart : public KParts::ReadOnlyPart {
public:
SvgPart(QWidget* parentWidget, QObject* parent, const QVariantList&);
virtual bool closeUrl();
protected:
virtual bool openFile();
......
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