Hide Show label option for not point objects.
--HG-- branch : feature
This commit is contained in:
parent
7864ae9572
commit
af1e01c243
|
@ -303,9 +303,10 @@ void VToolArc::ShowVisualization(bool show)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolArc::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolArc::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogArc>(event, id);
|
ContextMenu<DialogArc>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -281,9 +281,10 @@ void VToolArcWithLength::ShowVisualization(bool show)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolArcWithLength::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolArcWithLength::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogArcWithLength>(event, id);
|
ContextMenu<DialogArcWithLength>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -193,9 +193,10 @@ void VToolCubicBezier::ShowVisualization(bool show)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolCubicBezier::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolCubicBezier::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogCubicBezier>(event, id);
|
ContextMenu<DialogCubicBezier>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -181,9 +181,10 @@ void VToolCubicBezierPath::ShowVisualization(bool show)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolCubicBezierPath::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolCubicBezierPath::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogCubicBezierPath>(event, id);
|
ContextMenu<DialogCubicBezierPath>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -366,9 +366,10 @@ void VToolEllipticalArc::ShowVisualization(bool show)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolEllipticalArc::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolEllipticalArc::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogEllipticalArc>(event, id);
|
ContextMenu<DialogEllipticalArc>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -545,9 +545,10 @@ void VToolSpline::RefreshCtrlPoints()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolSpline::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolSpline::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogSpline>(event, id);
|
ContextMenu<DialogSpline>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -278,9 +278,10 @@ void VToolSplinePath::EnableToolMove(bool move)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolSplinePath::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolSplinePath::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogSplinePath>(event, id);
|
ContextMenu<DialogSplinePath>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,7 +110,7 @@ protected:
|
||||||
virtual void ChangeLabelVisibility(quint32 id, bool visible);
|
virtual void ChangeLabelVisibility(quint32 id, bool visible);
|
||||||
|
|
||||||
template <typename Dialog>
|
template <typename Dialog>
|
||||||
void ContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 itemId,
|
void ContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 itemId = NULL_ID,
|
||||||
const RemoveOption &showRemove = RemoveOption::Enable,
|
const RemoveOption &showRemove = RemoveOption::Enable,
|
||||||
const Referens &ref = Referens::Follow);
|
const Referens &ref = Referens::Follow);
|
||||||
|
|
||||||
|
@ -151,7 +151,14 @@ void VDrawTool::ContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 itemI
|
||||||
|
|
||||||
QAction *actionShowLabel = menu.addAction(tr("Show label"));
|
QAction *actionShowLabel = menu.addAction(tr("Show label"));
|
||||||
actionShowLabel->setCheckable(true);
|
actionShowLabel->setCheckable(true);
|
||||||
|
if (itemId != NULL_ID)
|
||||||
|
{
|
||||||
actionShowLabel->setChecked(IsLabelVisible(itemId));
|
actionShowLabel->setChecked(IsLabelVisible(itemId));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
actionShowLabel->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
QAction *actionRemove = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
|
QAction *actionRemove = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
|
||||||
if (showRemove == RemoveOption::Enable)
|
if (showRemove == RemoveOption::Enable)
|
||||||
|
|
|
@ -252,9 +252,10 @@ void VToolLine::AllowSelecting(bool enabled)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolLine::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
void VToolLine::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ContextMenu<DialogLine>(event, id);
|
ContextMenu<DialogLine>(event);
|
||||||
}
|
}
|
||||||
catch(const VExceptionToolWasDeleted &e)
|
catch(const VExceptionToolWasDeleted &e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user