// 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>
//
// JLH 06/04/2010 Added this text. :-)
//
+/*
+Program received signal SIGSEGV, Segmentation fault.
+0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, RS_Color const&) ()
+(gdb) bt
+#0 0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, RS_Color const&)
+ ()
+#1 0x080cf523 in PaintInterface::drawHandle(Vector const&, RS_Color const&, int) ()
+#2 0x0822d7e0 in GraphicView::drawEntity(RS_Entity*, double, bool) ()
+#3 0x0822d9a0 in GraphicView::deleteEntity(RS_Entity*) ()
+#4 0x081334dc in ActionModifyEntity::trigger() ()
+#5 0x081336ef in ActionModifyEntity::mouseReleaseEvent(QMouseEvent*) ()
+#6 0x08089d2a in RS_EventHandler::mouseReleaseEvent(QMouseEvent*) ()
+#7 0x0822a482 in GraphicView::mouseReleaseEvent(QMouseEvent*) ()
+#8 0x081eb00a in QG_GraphicView::mouseReleaseEvent(QMouseEvent*) ()
+#9 0xb77063c1 in QWidget::event(QEvent*) () from /usr/lib/qt4/libQtGui.so.4
+#10 0xb76a6b0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
+ from /usr/lib/qt4/libQtGui.so.4
+#11 0xb76ae24a in QApplication::notify(QObject*, QEvent*) ()
+ from /usr/lib/qt4/libQtGui.so.4
+#12 0xb7458882 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
+ from /usr/lib/qt4/libQtCore.so.4
+#13 0xb76acfa8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
+ from /usr/lib/qt4/libQtGui.so.4
+#14 0xb7739755 in ?? () from /usr/lib/qt4/libQtGui.so.4
+#15 0xb7738bac in QApplication::x11ProcessEvent(_XEvent*) ()
+ from /usr/lib/qt4/libQtGui.so.4
+#16 0xb7766064 in ?? () from /usr/lib/qt4/libQtGui.so.4
+#17 0xb720b654 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
+#18 0xb720f430 in ?? () from /usr/lib/libglib-2.0.so.0
+#19 0xb720f5d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
+#20 0xb7484ed5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
+#21 0xb7765b85 in ?? () from /usr/lib/qt4/libQtGui.so.4
+#22 0xb7456de9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
+#23 0xb745724a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
+ from /usr/lib/qt4/libQtCore.so.4
+#24 0xb745c56f in QCoreApplication::exec() () from /usr/lib/qt4/libQtCore.so.4
+#25 0xb76a6ba7 in QApplication::exec() () from /usr/lib/qt4/libQtGui.so.4
+#26 0x082325e7 in main ()
+*/
+
#include "actionmodifyentity.h"
+#include "rs_debug.h"
#include "rs_dialogfactory.h"
#include "graphicview.h"
ActionModifyEntity::ActionModifyEntity(RS_EntityContainer & container,
GraphicView & graphicView):
- ActionInterface("Modify Entity", container, graphicView)
+ ActionInterface("Modify Entity", container, graphicView), en(NULL)
{
- en = NULL;
+// en = NULL;
}
ActionModifyEntity::~ActionModifyEntity()
void ActionModifyEntity::trigger()
{
- if (en != NULL)
+ if (!en)
{
- RS_Entity * clone = en->clone();
-
- if (RS_DIALOGFACTORY->requestModifyEntityDialog(clone))
- {
- container->addEntity(clone);
-
- graphicView->deleteEntity(en);
- en->setSelected(false);
-
- clone->setSelected(false);
- graphicView->drawEntity(clone);
-
- if (document != NULL)
- {
- document->startUndoCycle();
+ RS_DEBUG->print("ActionModifyEntity::trigger: Entity is NULL\n");
+ return;
+ }
- document->addUndoable(clone);
- en->setUndoState(true);
- document->addUndoable(en);
+ RS_Entity * clone = en->clone();
- document->endUndoCycle();
- }
- RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+ if (RS_DIALOGFACTORY->requestModifyEntityDialog(clone))
+ {
+ container->addEntity(clone);
+#warning "!!! Old rendering path need upgrade !!!"
+#if 0
+ //(delete from screen...bleh)
+ graphicView->deleteEntity(en);
+#endif
+ en->setSelected(false);
+ clone->setSelected(false);
+ graphicView->drawEntity(clone);
+
+ if (document)
+ {
+ document->startUndoCycle();
+ document->addUndoable(clone);
+ en->setUndoState(true);
+ document->addUndoable(en);
+ document->endUndoCycle();
}
- else
- delete clone;
+ RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
}
else
- RS_DEBUG->print("ActionModifyEntity::trigger: Entity is NULL\n");
+ delete clone;
}
void ActionModifyEntity::mouseReleaseEvent(QMouseEvent * e)
{
graphicView->setMouseCursor(RS2::SelectCursor);
}
-
-