#851 Added "Open 3D Window" tool button in plot window. Raise mainWindow when activated from toolbar

This commit is contained in:
Magne Sjaastad
2016-10-04 09:29:45 +02:00
parent 0fc1d9cbf8
commit 3a2454cba0
10 changed files with 151 additions and 25 deletions

View File

@@ -80,7 +80,7 @@ RiuMainPlotWindow::RiuMainPlotWindow()
// Store the layout so we can offer reset option
m_initialDockAndToolbarLayout = saveState(0);
m_dragDropInterface = new RiuDragDrop;
m_dragDropInterface = std::make_unique<RiuDragDrop>();
initializeGuiNewProjectLoaded();
@@ -90,14 +90,6 @@ RiuMainPlotWindow::RiuMainPlotWindow()
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuMainPlotWindow::~RiuMainPlotWindow()
{
delete m_dragDropInterface;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -126,6 +118,8 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose()
void RiuMainPlotWindow::closeEvent(QCloseEvent* event)
{
saveWinGeoAndDockToolBarLayout();
RiaApplication::instance()->tryClosePlotWindow();
}
//--------------------------------------------------------------------------------------------------
@@ -189,6 +183,7 @@ void RiuMainPlotWindow::createToolBars()
QToolBar* toolbar = addToolBar(tr("Window Management"));
toolbar->setObjectName(toolbar->windowTitle());
toolbar->addAction(cmdFeatureMgr->action("RicTilePlotWindowsFeature"));
toolbar->addAction(cmdFeatureMgr->action("RicShowMainWindowFeature"));
}
}
@@ -358,7 +353,7 @@ void RiuMainPlotWindow::setPdmRoot(caf::PdmObject* pdmRoot)
m_projectTreeView->setPdmItem(pdmRoot);
// For debug only : m_projectTreeView->treeView()->expandAll();
m_projectTreeView->setDragDropInterface(m_dragDropInterface);
m_projectTreeView->setDragDropInterface(m_dragDropInterface.get());
}
//--------------------------------------------------------------------------------------------------