[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/krita/ora
From: Cyrille Berger <cyb () lepi ! org>
Date: 2007-12-20 22:52:58
Message-ID: 1198191178.944868.18822.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 751031 by berger:
fix saving of the xml stack and of the data
M +8 -1 ora_save_context.cc
--- trunk/koffice/filters/krita/ora/ora_save_context.cc #751030:751031
@@ -32,10 +32,15 @@
}
QString OraSaveContext::saveDeviceData(KisPaintLayerSP layer)
{
- QString filename = QString("data/%1.png").arg( m_id++ );
+ QString filename = QString("data/layer%1.png").arg( m_id++ );
if( m_store->open(filename))
{
KoStoreDevice io ( m_store );
+ if ( not io.open( QIODevice::WriteOnly ) )
+ {
+ kDebug(41008) <<"Couldn't open for writing:" << filename;
+ return "";
+ }
KisPNGConverter pngconv(0, layer->image()->undoAdapter());
vKisAnnotationSP_it annotIt = 0;
if( pngconv.buildFile(&io, layer->image(), layer->paintDevice(), annotIt, \
annotIt, 0, false, true) != KisImageBuilder_RESULT_OK) @@ -61,6 +66,8 @@
{
KoStoreDevice io ( m_store );
io.write( doc.toByteArray());
+ io.close();
+ m_store->close();
} else {
kDebug(41008) <<"Opening of the stack.xml file failed :";
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic