mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
remember script error panel height per scriptsubview
This commit is contained in:
parent
26640d17eb
commit
f5c61ee616
2 changed files with 11 additions and 2 deletions
|
@ -73,10 +73,13 @@ void CSVWorld::ScriptSubView::adjustSplitter()
|
|||
if (mErrors->height())
|
||||
return; // keep old height if the error panel was already open
|
||||
|
||||
sizes << 1 << 1;
|
||||
sizes << (mMain->height()-mErrorHeight-mMain->handleWidth()) << mErrorHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mErrors->height())
|
||||
mErrorHeight = mErrors->height();
|
||||
|
||||
sizes << 1 << 0;
|
||||
}
|
||||
|
||||
|
@ -85,7 +88,8 @@ void CSVWorld::ScriptSubView::adjustSplitter()
|
|||
|
||||
CSVWorld::ScriptSubView::ScriptSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
||||
: SubView (id), mDocument (document), mColumn (-1), mBottom(0), mButtons (0),
|
||||
mCommandDispatcher (document, CSMWorld::UniversalId::getParentType (id.getType()))
|
||||
mCommandDispatcher (document, CSMWorld::UniversalId::getParentType (id.getType())),
|
||||
mErrorHeight (100)
|
||||
{
|
||||
std::vector<std::string> selection (1, id.getId());
|
||||
mCommandDispatcher.setSelection (selection);
|
||||
|
@ -101,6 +105,10 @@ CSVWorld::ScriptSubView::ScriptSubView (const CSMWorld::UniversalId& id, CSMDoc:
|
|||
mErrors = new ScriptErrorTable (document, this);
|
||||
mMain->addWidget (mErrors);
|
||||
|
||||
QList<int> sizes;
|
||||
sizes << 1 << 0;
|
||||
mMain->setSizes (sizes);
|
||||
|
||||
QWidget *widget = new QWidget (this);;
|
||||
widget->setLayout (&mLayout);
|
||||
setWidget (widget);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace CSVWorld
|
|||
QSplitter *mMain;
|
||||
ScriptErrorTable *mErrors;
|
||||
QTimer *mCompileDelay;
|
||||
int mErrorHeight;
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Reference in a new issue