1 // actionmodifyentity.cpp
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 06/04/2010 Added this text. :-)
18 Program received signal SIGSEGV, Segmentation fault.
19 0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, Color const&) ()
21 #0 0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, Color const&)
23 #1 0x080cf523 in PaintInterface::drawHandle(Vector const&, Color const&, int) ()
24 #2 0x0822d7e0 in GraphicView::drawEntity(Entity*, double, bool) ()
25 #3 0x0822d9a0 in GraphicView::deleteEntity(Entity*) ()
26 #4 0x081334dc in ActionModifyEntity::trigger() ()
27 #5 0x081336ef in ActionModifyEntity::mouseReleaseEvent(QMouseEvent*) ()
28 #6 0x08089d2a in EventHandler::mouseReleaseEvent(QMouseEvent*) ()
29 #7 0x0822a482 in GraphicView::mouseReleaseEvent(QMouseEvent*) ()
30 #8 0x081eb00a in QG_GraphicView::mouseReleaseEvent(QMouseEvent*) ()
31 #9 0xb77063c1 in QWidget::event(QEvent*) () from /usr/lib/qt4/libQtGui.so.4
32 #10 0xb76a6b0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
33 from /usr/lib/qt4/libQtGui.so.4
34 #11 0xb76ae24a in QApplication::notify(QObject*, QEvent*) ()
35 from /usr/lib/qt4/libQtGui.so.4
36 #12 0xb7458882 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
37 from /usr/lib/qt4/libQtCore.so.4
38 #13 0xb76acfa8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
39 from /usr/lib/qt4/libQtGui.so.4
40 #14 0xb7739755 in ?? () from /usr/lib/qt4/libQtGui.so.4
41 #15 0xb7738bac in QApplication::x11ProcessEvent(_XEvent*) ()
42 from /usr/lib/qt4/libQtGui.so.4
43 #16 0xb7766064 in ?? () from /usr/lib/qt4/libQtGui.so.4
44 #17 0xb720b654 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
45 #18 0xb720f430 in ?? () from /usr/lib/libglib-2.0.so.0
46 #19 0xb720f5d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
47 #20 0xb7484ed5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
48 #21 0xb7765b85 in ?? () from /usr/lib/qt4/libQtGui.so.4
49 #22 0xb7456de9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
50 #23 0xb745724a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
51 from /usr/lib/qt4/libQtCore.so.4
52 #24 0xb745c56f in QCoreApplication::exec() () from /usr/lib/qt4/libQtCore.so.4
53 #25 0xb76a6ba7 in QApplication::exec() () from /usr/lib/qt4/libQtGui.so.4
54 #26 0x082325e7 in main ()
57 #include "actionmodifyentity.h"
60 #include "dialogfactory.h"
61 #include "graphicview.h"
63 ActionModifyEntity::ActionModifyEntity(EntityContainer & container,
64 GraphicView & graphicView):
65 ActionInterface("Modify Entity", container, graphicView), en(NULL)
70 ActionModifyEntity::~ActionModifyEntity()
74 void ActionModifyEntity::trigger()
78 DEBUG->print("ActionModifyEntity::trigger: Entity is NULL\n");
82 Entity * clone = en->clone();
84 if (DIALOGFACTORY->requestModifyEntityDialog(clone))
86 container->addEntity(clone);
87 #warning "!!! Old rendering path need upgrade !!!"
89 //(delete from screen...bleh)
90 graphicView->deleteEntity(en);
92 en->setSelected(false);
93 clone->setSelected(false);
94 graphicView->drawEntity(clone);
98 document->startUndoCycle();
99 document->addUndoable(clone);
100 en->setUndoState(true);
101 document->addUndoable(en);
102 document->endUndoCycle();
105 DIALOGFACTORY->updateSelectionWidget(container->countSelected());
111 void ActionModifyEntity::mouseReleaseEvent(QMouseEvent * e)
113 if (e->button() == Qt::RightButton)
114 init(getStatus() - 1);
122 void ActionModifyEntity::updateMouseCursor()
124 graphicView->setMouseCursor(RS2::SelectCursor);