X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fdrawing.cpp;h=283586a076e4820f2557efef5f85b4541650c716;hb=bd2b29c8735d83ab48df13c3efee53f63570473e;hp=a891bd46ca7da3edf9a70dfb2293b3417cf0138d;hpb=d86611a87f46873819dfae63f1112b248ba9aca1;p=architektonas diff --git a/src/base/drawing.cpp b/src/base/drawing.cpp index a891bd4..283586a 100644 --- a/src/base/drawing.cpp +++ b/src/base/drawing.cpp @@ -133,7 +133,6 @@ bool Drawing::save() RS_DEBUG->print("Drawing::save"); RS_DEBUG->print(" file: %s", filename.toLatin1().data()); RS_DEBUG->print(" format: %d", (int)formatType); - RS_DEBUG->print(" export..."); ret = RS_FILEIO->fileExport(*this, filename, formatType); @@ -163,29 +162,23 @@ bool Drawing::saveAs(const QString & filename, RS2::FormatType type) } /** - * Loads the given fils into this graphic. + * Loads the given file into this graphic. */ -bool Drawing::open(const QString &filename, RS2::FormatType type) +bool Drawing::open(const QString & filename, RS2::FormatType type) { RS_DEBUG->print("Drawing::open(%s)", filename.toLatin1().data()); - bool ret = false; - this->filename = filename; - // clean all: newDoc(); - // import file: ret = RS_FILEIO->fileImport(*this, filename, type); - setModified(false); layerList.setModified(false); blockList.setModified(false); //cout << *((Drawing*)graphic); //calculateBorders(); - RS_DEBUG->print("Drawing::open(%s): OK", filename.toLatin1().data()); return ret; @@ -239,7 +232,7 @@ RS_Layer * Drawing::getActiveLayer() for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone)) { - if (e->getLayer() != NULL && e->getLayer()->getName() == layer->getName()) + if (e->getLayer() && e->getLayer()->getName() == layer->getName()) { e->setUndoState(true); e->setLayer("0"); @@ -254,7 +247,7 @@ RS_Layer * Drawing::getActiveLayer() { RS_Block * blk = blockList.at(bi); - if (blk != NULL) + if (blk) { for(RS_Entity * e=blk->firstEntity(RS2::ResolveNone); e!=NULL; e=blk->nextEntity(RS2::ResolveNone)) {