PartGui: Remove remaining measure "clear all" and "toggle delta" commands

This commit is contained in:
hlorus
2024-05-16 13:00:57 +02:00
committed by Chris Hennes
parent 53da36a93a
commit b40fe64db3
3 changed files with 2 additions and 70 deletions

View File

@@ -3311,64 +3311,6 @@ void StdCmdDemoMode::activated(int iMsg)
dlg->show();
}
//===========================================================================
// Part_Measure_Clear_All
//===========================================================================
DEF_STD_CMD(CmdViewMeasureClearAll)
CmdViewMeasureClearAll::CmdViewMeasureClearAll()
: Command("View_Measure_Clear_All")
{
sGroup = "Measure";
sMenuText = QT_TR_NOOP("Clear measurement");
sToolTipText = QT_TR_NOOP("Clear all visible measurements");
sWhatsThis = "View_Measure_Clear_All";
sStatusTip = sToolTipText;
sPixmap = "Part_Measure_Clear_All";
}
void CmdViewMeasureClearAll::activated(int iMsg)
{
Q_UNUSED(iMsg);
auto view = dynamic_cast<Gui::View3DInventor*>(Gui::Application::Instance->
activeDocument()->getActiveView());
if (!view)
return;
Gui::View3DInventorViewer *viewer = view->getViewer();
if (!viewer)
return;
viewer->eraseAllDimensions();
}
//===========================================================================
// Part_Measure_Toggle_All
//===========================================================================
DEF_STD_CMD(CmdViewMeasureToggleAll)
CmdViewMeasureToggleAll::CmdViewMeasureToggleAll()
: Command("View_Measure_Toggle_All")
{
sGroup = "Measure";
sMenuText = QT_TR_NOOP("Toggle measurement");
sToolTipText = QT_TR_NOOP("Turn on or off the display of all measurements");
sWhatsThis = "View_Measure_Toggle_All";
sStatusTip = sToolTipText;
sPixmap = "Part_Measure_Toggle_All";
}
void CmdViewMeasureToggleAll::activated(int iMsg)
{
Q_UNUSED(iMsg);
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View");
bool visibility = group->GetBool("DimensionsVisible", true);
if (visibility)
group->SetBool("DimensionsVisible", false);
else
group->SetBool("DimensionsVisible", true);
}
//===========================================================================
// Std_SelBack
@@ -4156,8 +4098,6 @@ void CreateViewStdCommands()
rcCmdMgr.addCommand(new StdCmdDemoMode());
rcCmdMgr.addCommand(new StdCmdToggleNavigation());
rcCmdMgr.addCommand(new StdCmdAxisCross());
rcCmdMgr.addCommand(new CmdViewMeasureClearAll());
rcCmdMgr.addCommand(new CmdViewMeasureToggleAll());
rcCmdMgr.addCommand(new StdCmdSelBoundingBox());
rcCmdMgr.addCommand(new StdCmdTreeViewActions());
rcCmdMgr.addCommand(new StdCmdDockOverlay());