mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 02:15:32 +00:00
extracted creation of scroll area to separate method
This commit is contained in:
parent
9539925f3e
commit
3bfab9c2c9
2 changed files with 11 additions and 8 deletions
|
@ -419,10 +419,7 @@ CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int to
|
|||
}
|
||||
else
|
||||
{
|
||||
mScroll = new QScrollArea(this);
|
||||
mScroll->setWidgetResizable(true);
|
||||
mScroll->setWidget(&mSubViewWindow);
|
||||
setCentralWidget(mScroll);
|
||||
createScrollArea();
|
||||
}
|
||||
|
||||
mOperations = new Operations;
|
||||
|
@ -626,10 +623,7 @@ void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
|
|||
}
|
||||
else
|
||||
{
|
||||
mScroll = new QScrollArea(this);
|
||||
mScroll->setWidgetResizable(true);
|
||||
mScroll->setWidget(&mSubViewWindow);
|
||||
setCentralWidget(mScroll);
|
||||
createScrollArea();
|
||||
}
|
||||
}
|
||||
else if (mScroll)
|
||||
|
@ -964,3 +958,11 @@ void CSVDoc::View::updateWidth(bool isGrowLimit, int minSubViewWidth)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSVDoc::View::createScrollArea()
|
||||
{
|
||||
mScroll = new QScrollArea(this);
|
||||
mScroll->setWidgetResizable(true);
|
||||
mScroll->setWidget(&mSubViewWindow);
|
||||
setCentralWidget(mScroll);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace CSVDoc
|
|||
|
||||
void updateScrollbar();
|
||||
void updateWidth(bool isGrowLimit, int minSubViewWidth);
|
||||
void createScrollArea();
|
||||
public:
|
||||
|
||||
View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews);
|
||||
|
|
Loading…
Reference in a new issue