]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifydeletequick.cpp
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifydeletequick.cpp
index 6ec8ddd301ec5e96fa0848c17794c4f9c3dddc87..2be4009512c22af71c11c0002f978357239a0dbe 100644 (file)
@@ -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 <jlhamm@acm.org>
 //
 
 #include "actionmodifydeletequick.h"
 
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
 #include "graphicview.h"
 
 ActionModifyDeleteQuick::ActionModifyDeleteQuick(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Quick Delete Entities", container, graphicView)
 {
        en = NULL;
@@ -33,17 +36,20 @@ ActionModifyDeleteQuick::~ActionModifyDeleteQuick()
  */
 void ActionModifyDeleteQuick::trigger()
 {
-       RS_DEBUG->print("ActionModifyDeleteQuick::trigger()");
+       DEBUG->print("ActionModifyDeleteQuick::trigger()");
 
-       if (en != NULL)
+       if (en)
        {
-               RS_DEBUG->print("Entity found");
-               RS_EntityContainer * parent = en->getParent();
+               DEBUG->print("Entity found");
+               EntityContainer * parent = en->getParent();
 
-               if (parent != NULL)
+               if (parent)
                {
                        en->setSelected(false);
+#warning "!!! Old rendering path need upgrade !!!"
+#if 0
                        graphicView->deleteEntity(en);
+#endif
                        en->changeUndoState();
 
                        if (document)
@@ -54,10 +60,10 @@ void ActionModifyDeleteQuick::trigger()
                        }
                }
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("ActionModifyDeleteQuick::mousePressEvent:"
+               DEBUG->print("ActionModifyDeleteQuick::mousePressEvent:"
                        " Entity is NULL\n");
 }
 
@@ -77,12 +83,12 @@ void ActionModifyDeleteQuick::updateMouseButtonHints()
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Pick entity to delete"),
+               DIALOGFACTORY->updateMouseWidget(tr("Pick entity to delete"),
                        tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }