From d4a71f76646de5dec34922beb88ce0af0dc6ca6a Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 1 Sep 2014 14:01:50 +0300 Subject: [PATCH] Hide options when use context menu. --HG-- branch : feature --- src/app/tools/drawTools/vdrawtool.h | 3 +++ src/app/widgets/vtooloptionspropertybrowser.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/tools/drawTools/vdrawtool.h b/src/app/tools/drawTools/vdrawtool.h index 9d11576e8..0254e5363 100644 --- a/src/app/tools/drawTools/vdrawtool.h +++ b/src/app/tools/drawTools/vdrawtool.h @@ -36,6 +36,7 @@ #include "../../dialogs/tools/dialogtool.h" #include "../../widgets/vmaingraphicsscene.h" #include "../../xml/vpattern.h" +#include "../../widgets/vmaingraphicsview.h" /** * @brief The VDrawTool abstract class for all draw tool. @@ -120,6 +121,7 @@ protected: QAction *selectedAction = menu.exec(event->screenPos()); if (selectedAction == actionOption) { + qApp->getSceneView()->itemClicked(nullptr); dialog = new Dialog(getData(), id, qApp->getMainWindow()); dialog->setModal(true); @@ -136,6 +138,7 @@ protected: } if (selectedAction == actionRemove) { + qApp->getSceneView()->itemClicked(nullptr); DeleteTool(); } } diff --git a/src/app/widgets/vtooloptionspropertybrowser.cpp b/src/app/widgets/vtooloptionspropertybrowser.cpp index d2ecf97e3..b3a0c9a32 100644 --- a/src/app/widgets/vtooloptionspropertybrowser.cpp +++ b/src/app/widgets/vtooloptionspropertybrowser.cpp @@ -87,7 +87,7 @@ void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item) AddPropertyPointsList(i, tr("Base point"), i->getBasePointId(), VAbstractTool::AttrBasePoint); AddPropertyLineType(i, tr("Line type")); AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength); - AddPropertyFormula(tr("Angle"), i->getFormulaLength(), VAbstractTool::AttrAngle); + AddPropertyFormula(tr("Angle"), i->getFormulaAngle(), VAbstractTool::AttrAngle); break; } case VToolAlongLine::Type: