mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
Fix tile windows command, and make sure logger is reconnected to 3d view if it is closed and reopened
This commit is contained in:
parent
7e31e6e55a
commit
86b21714eb
@ -969,6 +969,13 @@ void RiaGuiApplication::createMainWindow()
|
||||
m_mainWindow->setDefaultToolbarVisibility();
|
||||
m_mainWindow->loadWinGeoAndDockToolBarLayout();
|
||||
m_mainWindow->showWindow();
|
||||
|
||||
// if there is an existing logger, reconnect to it
|
||||
auto logger = dynamic_cast<RiuMessagePanelLogger*>( RiaLogging::loggerInstance() );
|
||||
if ( logger )
|
||||
{
|
||||
logger->addMessagePanel( m_mainWindow->messagePanel() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -2105,3 +2105,11 @@ QStringList RiuMainWindow::defaultDockStateNames()
|
||||
RiuDockWidgetTools::dockStateHideAll3DWindowName() };
|
||||
return retList;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QAction* RiuMainWindow::tileSubWindowsAction()
|
||||
{
|
||||
return caf::CmdFeatureManager::instance()->action( "RicTileWindowsFeature" );
|
||||
}
|
||||
|
@ -140,6 +140,7 @@ public:
|
||||
protected:
|
||||
void closeEvent( QCloseEvent* event ) override;
|
||||
QStringList defaultDockStateNames() override;
|
||||
QAction* tileSubWindowsAction() override;
|
||||
|
||||
private:
|
||||
void createActions();
|
||||
|
@ -753,7 +753,7 @@ void RiuMainWindowBase::addDefaultEntriesToWindowsMenu()
|
||||
QAction* closeAllSubWindowsAction = new QAction( "Close All Windows", this );
|
||||
connect( closeAllSubWindowsAction, SIGNAL( triggered() ), m_mdiArea, SLOT( closeAllSubWindows() ) );
|
||||
|
||||
m_windowMenu->addAction( caf::CmdFeatureManager::instance()->action( "RicTilePlotWindowsFeature" ) );
|
||||
m_windowMenu->addAction( tileSubWindowsAction() );
|
||||
m_windowMenu->addAction( cascadeWindowsAction );
|
||||
m_windowMenu->addAction( closeAllSubWindowsAction );
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ class PdmUiTreeView;
|
||||
class PdmUiItem;
|
||||
} // namespace caf
|
||||
|
||||
class QAction;
|
||||
class QMdiArea;
|
||||
class QMdiSubWindow;
|
||||
class QUndoView;
|
||||
@ -113,6 +114,8 @@ protected:
|
||||
|
||||
virtual QStringList defaultDockStateNames() = 0;
|
||||
|
||||
virtual QAction* tileSubWindowsAction() = 0;
|
||||
|
||||
protected slots:
|
||||
void slotDockWidgetToggleViewActionTriggered();
|
||||
void slotRefreshHelpActions();
|
||||
|
@ -151,7 +151,10 @@ RiuMessagePanelLogger::RiuMessagePanelLogger()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMessagePanelLogger::addMessagePanel( RiuMessagePanel* messagePanel )
|
||||
{
|
||||
m_messagePanel.push_back( messagePanel );
|
||||
// get rid of any unused entries (qpointers are null)
|
||||
m_messagePanels.erase( std::remove( m_messagePanels.begin(), m_messagePanels.end(), nullptr ), m_messagePanels.end() );
|
||||
|
||||
m_messagePanels.push_back( messagePanel );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -212,7 +215,7 @@ void RiuMessagePanelLogger::writeToMessagePanel( RILogLevel messageLevel, const
|
||||
return;
|
||||
}
|
||||
|
||||
for ( auto& panel : m_messagePanel )
|
||||
for ( auto& panel : m_messagePanels )
|
||||
{
|
||||
if ( panel )
|
||||
{
|
||||
|
@ -72,6 +72,6 @@ private:
|
||||
void writeToMessagePanel( RILogLevel messageLevel, const char* message );
|
||||
|
||||
private:
|
||||
std::vector<QPointer<RiuMessagePanel>> m_messagePanel;
|
||||
std::vector<QPointer<RiuMessagePanel>> m_messagePanels;
|
||||
int m_logLevel;
|
||||
};
|
||||
|
@ -1210,3 +1210,11 @@ void RiuPlotMainWindow::slotToggleSelectionLink()
|
||||
{
|
||||
m_selection3DLinkEnabled = !m_selection3DLinkEnabled;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QAction* RiuPlotMainWindow::tileSubWindowsAction()
|
||||
{
|
||||
return caf::CmdFeatureManager::instance()->action( "RicTilePlotWindowsFeature" );
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ protected:
|
||||
void dropEvent( QDropEvent* event ) override;
|
||||
|
||||
QStringList defaultDockStateNames() override;
|
||||
QAction* tileSubWindowsAction() override;
|
||||
|
||||
private:
|
||||
void setPdmRoot( caf::PdmObject* pdmRoot );
|
||||
|
Loading…
Reference in New Issue
Block a user