mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2487 Avoid switching view when clicking objs in the intersectino view. Some minor refactoring of the MainWindows
This commit is contained in:
@@ -21,11 +21,15 @@
|
||||
#include "RiaVersionInfo.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuMainWindowBase::RiuMainWindowBase()
|
||||
: m_projectTreeView(nullptr)
|
||||
, m_allowActiveViewChangeFromSelection(true)
|
||||
{
|
||||
setDockNestingEnabled(true);
|
||||
}
|
||||
@@ -96,3 +100,21 @@ QString RiuMainWindowBase::registryFolderName()
|
||||
QString regFolder = QString("%1/%2").arg(versionName).arg(mainWindowName());
|
||||
return regFolder;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindowBase::selectAsCurrentItem(const caf::PdmObject* object, bool allowActiveViewChange)
|
||||
{
|
||||
m_allowActiveViewChangeFromSelection = allowActiveViewChange;
|
||||
m_projectTreeView->selectAsCurrentItem(object);
|
||||
m_allowActiveViewChangeFromSelection = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindowBase::setExpanded(const caf::PdmUiItem* uiItem, bool expanded)
|
||||
{
|
||||
m_projectTreeView->setExpanded(uiItem, expanded);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user