#3804 #3805 Measurement. Add toolbar button and interactive picking

This commit is contained in:
Bjørn Erik Jensen
2018-12-19 14:41:17 +01:00
parent d202e430d2
commit 849a623379
23 changed files with 837 additions and 3 deletions

View File

@@ -75,6 +75,7 @@
#include "cafUtils.h"
#include "ExportCommands/RicSnapshotAllViewsToFileFeature.h"
#include "MeasurementCommands/RicToggleMeasurementModeFeature.h"
#include "SummaryPlotCommands/RicEditSummaryPlotFeature.h"
#include "SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.h"
@@ -597,6 +598,11 @@ void RiuMainWindow::createToolBars()
m_holoLensToolBar->addAction(cmdFeatureMgr->action("RicHoloLensExportToSharingServerFeature"));
}
{
QToolBar* measToolBar = addToolBar(tr("Measurement"));
measToolBar->addAction(cmdFeatureMgr->action("RicToggleMeasurementModeFeature"));
}
RiaApplication* app = RiaApplication::instance();
if (app->preferences()->showTestToolbar())
{
@@ -869,6 +875,15 @@ void RiuMainWindow::slotRefreshViewActions()
<< "RicViewZoomAllFeature";
caf::CmdFeatureManager::instance()->refreshEnabledState(commandIds);
caf::CmdFeatureManager* cmdFeatureMgr = caf::CmdFeatureManager::instance();
auto feature = dynamic_cast<RicToggleMeasurementModeFeature*>(
cmdFeatureMgr->getCommandFeature("RicToggleMeasurementModeFeature"));
if (feature)
{
feature->refreshActionLook();
}
}
//--------------------------------------------------------------------------------------------------