Hide options when use context menu.

--HG--
branch : feature
This commit is contained in:
dismine 2014-09-01 14:01:50 +03:00
parent c412d0c51b
commit d4a71f7664
2 changed files with 4 additions and 1 deletions

View file

@ -36,6 +36,7 @@
#include "../../dialogs/tools/dialogtool.h" #include "../../dialogs/tools/dialogtool.h"
#include "../../widgets/vmaingraphicsscene.h" #include "../../widgets/vmaingraphicsscene.h"
#include "../../xml/vpattern.h" #include "../../xml/vpattern.h"
#include "../../widgets/vmaingraphicsview.h"
/** /**
* @brief The VDrawTool abstract class for all draw tool. * @brief The VDrawTool abstract class for all draw tool.
@ -120,6 +121,7 @@ protected:
QAction *selectedAction = menu.exec(event->screenPos()); QAction *selectedAction = menu.exec(event->screenPos());
if (selectedAction == actionOption) if (selectedAction == actionOption)
{ {
qApp->getSceneView()->itemClicked(nullptr);
dialog = new Dialog(getData(), id, qApp->getMainWindow()); dialog = new Dialog(getData(), id, qApp->getMainWindow());
dialog->setModal(true); dialog->setModal(true);
@ -136,6 +138,7 @@ protected:
} }
if (selectedAction == actionRemove) if (selectedAction == actionRemove)
{ {
qApp->getSceneView()->itemClicked(nullptr);
DeleteTool(); DeleteTool();
} }
} }

View file

@ -87,7 +87,7 @@ void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item)
AddPropertyPointsList(i, tr("Base point"), i->getBasePointId(), VAbstractTool::AttrBasePoint); AddPropertyPointsList(i, tr("Base point"), i->getBasePointId(), VAbstractTool::AttrBasePoint);
AddPropertyLineType(i, tr("Line type")); AddPropertyLineType(i, tr("Line type"));
AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength); AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength);
AddPropertyFormula(tr("Angle"), i->getFormulaLength(), VAbstractTool::AttrAngle); AddPropertyFormula(tr("Angle"), i->getFormulaAngle(), VAbstractTool::AttrAngle);
break; break;
} }
case VToolAlongLine::Type: case VToolAlongLine::Type: