X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fwidgets%2Fqg_dialogfactory.cpp;h=b5093ceed36a5d899ca325a28969ffbe280762bb;hb=af32602b9d8075080d5805143f1cd47fc10672e1;hp=16ad8be4fe00f3dbefc3b8a03107720f0f2d9e0d;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/widgets/qg_dialogfactory.cpp b/src/widgets/qg_dialogfactory.cpp index 16ad8be..b5093ce 100644 --- a/src/widgets/qg_dialogfactory.cpp +++ b/src/widgets/qg_dialogfactory.cpp @@ -3,7 +3,9 @@ // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun // Extensively rewritten and refactored by James L. Hammons -// (C) 2010 Underground Software +// Portions copyright (C) 2001-2003 RibbonSoft +// Copyright (C) 2010 Underground Software +// See the README and GPLv2 files for licensing and warranty information // // JLH = James L. Hammons // @@ -15,13 +17,14 @@ #include "qg_dialogfactory.h" #include "graphicview.h" -#include "qg_layerwidget.h" +#include "layerwidget.h" #include "qg_mainwindowinterface.h" #include "actiondimlinear.h" #include "actioninterface.h" #include "rs_blocklist.h" #include "rs_document.h" #include "rs_hatch.h" +#include "rs_layerlist.h" #include "rs_patternlist.h" #include "settings.h" #include "rs_system.h" @@ -336,17 +339,8 @@ RS_Layer * QG_DialogFactory::requestEditLayerDialog(RS_LayerList * layerList) { RS_DEBUG->print("QG_DialogFactory::requestEditLayerDialog"); RS_Layer * layer = NULL; - /* - if (layerList==NULL) { - if (container!=NULL && container->rtti()==RS2::EntityGraphic) { - layerList = (RS_LayerList*)container; - } else { - return NULL; - } - } - */ - if (layerList == NULL) + if (!layerList) { RS_DEBUG->print(RS_Debug::D_WARNING, "QG_DialogFactory::requestEditLayerDialog(): " "layerList is NULL"); @@ -354,7 +348,7 @@ RS_Layer * QG_DialogFactory::requestEditLayerDialog(RS_LayerList * layerList) } // Layer for parameter livery - if (layerList->getActive() != NULL) + if (layerList->getActive()) { layer = new RS_Layer(*layerList->getActive()); @@ -1405,7 +1399,7 @@ void QG_DialogFactory::requestLibraryInsertOptions(ActionInterface * action, boo */ void QG_DialogFactory::requestToolBar(RS2::ToolBarId id) { - if (cadToolBar != NULL) + if (cadToolBar) cadToolBar->showToolBar(id); }