#4775 Summary : Add text based curve creation to toolbar

This commit is contained in:
Magne Sjaastad
2019-10-21 16:18:07 +02:00
parent 3a174edf0e
commit 7be2cc3031
6 changed files with 114 additions and 13 deletions

View File

@@ -558,23 +558,22 @@ void RiuPlotMainWindow::updateSummaryPlotToolBar( bool forceUpdateUi )
{
std::vector<caf::PdmFieldHandle*> toolBarFields = summaryPlot->fieldsToShowInToolbar();
QString keyword;
if ( !m_summaryPlotToolBarEditor->isEditorDataValid( toolBarFields ) )
{
keyword = m_summaryPlotToolBarEditor->keywordForWidgetWithFocus();
m_summaryPlotToolBarEditor->setFields( toolBarFields );
}
else if ( forceUpdateUi )
{
m_summaryPlotToolBarEditor->updateUi();
}
m_summaryPlotToolBarEditor->updateUi();
m_summaryPlotToolBarEditor->show();
m_summaryPlotToolBarEditor->setKeyboardFocusFromKeyword( keyword );
}
else
{
m_summaryPlotToolBarEditor->clear();
m_summaryPlotToolBarEditor->hide();
}