mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#485) Grow plot size when adding tracks
This commit is contained in:
@@ -115,6 +115,7 @@ public:
|
||||
|
||||
void tileWindows();
|
||||
bool isAnyMdiSubWindowVisible();
|
||||
QMdiSubWindow* findMdiSubWindow(QWidget* viewer);
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent* event);
|
||||
@@ -130,8 +131,6 @@ private:
|
||||
|
||||
void updateRecentFileActions();
|
||||
|
||||
QMdiSubWindow* findMdiSubWindow(QWidget* viewer);
|
||||
|
||||
void storeTreeViewState();
|
||||
void restoreTreeViewState();
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QScrollBar>
|
||||
#include <QFocusEvent>
|
||||
#include <QMdiSubWindow>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -73,7 +74,16 @@ void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrackPlot* trackPlot)
|
||||
{
|
||||
// Insert the plot to the left of the scroll bar
|
||||
m_layout->insertWidget(m_layout->count() - 1, trackPlot);
|
||||
m_trackPlots.append(trackPlot);
|
||||
m_trackPlots.append(trackPlot);
|
||||
|
||||
QMdiSubWindow* mdiWindow = RiuMainWindow::instance()->findMdiSubWindow(this);
|
||||
if (mdiWindow)
|
||||
{
|
||||
QSize subWindowSize = mdiWindow->size();
|
||||
subWindowSize.setWidth(subWindowSize.width() + trackPlot->width());
|
||||
|
||||
mdiWindow->resize(subWindowSize);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user