]> Shamusworld >> Repos - architektonas/blobdiff - src/base/rs_modification.cpp
Fixed Library Browser...
[architektonas] / src / base / rs_modification.cpp
index 9a39ff03dc92ee3e39565e4b9b1143b967a145eb..c43ae64b1eff4dc141fabdd8e1947d006d504fe8 100644 (file)
@@ -84,24 +84,22 @@ void RS_Modification::remove()
  */
 bool RS_Modification::changeAttributes(RS_AttributesData & data)
 {
-       if (container == NULL)
+       if (!container)
        {
                RS_DEBUG->print("RS_Modification::changeAttributes: no valid container", RS_Debug::D_WARNING);
                return false;
        }
 
-//     Q3PtrList<RS_Entity> addList;
-//     addList.setAutoDelete(false);
        QList<RS_Entity *> addList;
 
-       if (document != NULL)
+       if (document)
                document->startUndoCycle();
 
        for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
                //for (uint i=0; i<container->count(); ++i) {
                //RS_Entity* e = container->entityAt(i);
-               if (e != NULL && e->isSelected())
+               if (e && e->isSelected())
                {
                        RS_Entity * ec = e->clone();
                        ec->setSelected(false);
@@ -139,10 +137,10 @@ bool RS_Modification::changeAttributes(RS_AttributesData & data)
        deselectOriginals(true);
        addNewEntities(addList);
 
-       if (document != NULL)
+       if (document)
                document->endUndoCycle();
 
-       if (graphicView != NULL)
+       if (graphicView)
                graphicView->redraw();
 
        return true;