mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add quick access dock widget
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "RicGridCalculatorDialog.h"
|
||||
|
||||
#include "QuickAccess/RimQuickAccessCollection.h"
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
@@ -188,6 +189,11 @@ RiuMainWindow::~RiuMainWindow()
|
||||
{
|
||||
m_pdmUiPropertyView->showProperties( nullptr );
|
||||
}
|
||||
|
||||
if ( m_quickAccessView )
|
||||
{
|
||||
m_quickAccessView->showProperties( nullptr );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -239,6 +245,8 @@ void RiuMainWindow::initializeGuiNewProjectLoaded()
|
||||
m_pdmUiPropertyView->currentObject()->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
m_quickAccessView->showProperties( RimQuickAccessCollection::instance() );
|
||||
|
||||
if ( statusBar() && !RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
|
||||
{
|
||||
statusBar()->showMessage( "Ready ..." );
|
||||
@@ -295,6 +303,11 @@ void RiuMainWindow::cleanupGuiCaseClose()
|
||||
m_pdmUiPropertyView->showProperties( nullptr );
|
||||
}
|
||||
|
||||
if ( m_quickAccessView )
|
||||
{
|
||||
m_quickAccessView->showProperties( nullptr );
|
||||
}
|
||||
|
||||
for ( auto& additionalProjectView : m_additionalProjectViews )
|
||||
{
|
||||
RiuProjectAndPropertyView* projPropView = dynamic_cast<RiuProjectAndPropertyView*>( additionalProjectView->widget() );
|
||||
@@ -808,6 +821,15 @@ void RiuMainWindow::createDockPanels()
|
||||
dockManager()->addDockWidget( ads::DockWidgetArea::BottomDockWidgetArea, dockWidget, leftArea );
|
||||
}
|
||||
|
||||
{
|
||||
auto dockWidget =
|
||||
RiuDockWidgetTools::createDockWidget( "Quick Access", RiuDockWidgetTools::mainWindowQuickAccessName(), dockManager() );
|
||||
|
||||
m_quickAccessView = new caf::PdmUiPropertyView( dockWidget );
|
||||
dockWidget->setWidget( m_quickAccessView );
|
||||
dockManager()->addDockWidget( ads::DockWidgetArea::BottomDockWidgetArea, dockWidget, leftArea );
|
||||
}
|
||||
|
||||
#ifdef USE_ODB_API
|
||||
{
|
||||
auto dockWidget =
|
||||
@@ -1534,6 +1556,9 @@ void RiuMainWindow::selectedObjectsChanged()
|
||||
projectTree->treeView()->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
// The update of quick access view is depending on active view, and must be done after the active view is set
|
||||
m_quickAccessView->showProperties( RimQuickAccessCollection::instance() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user