Fix starting panel resizing issues
This commit is contained in:
parent
dce821346f
commit
285084188a
3 changed files with 7 additions and 16 deletions
|
@ -807,10 +807,6 @@ int main(int argc, char *argv[]) {
|
|||
w.checkForUpdates();
|
||||
DvDirModel::instance()->forceRefresh();
|
||||
|
||||
// Disable the layout temporarily to avoid redistribution of panes that is
|
||||
// executed during resizeEvents that are being called. It will reenable when
|
||||
// the resizeEvent() is called
|
||||
w.getCurrentRoom()->dockLayout()->setEnabled(false);
|
||||
w.show();
|
||||
|
||||
// Show floating panels only after the main window has been shown
|
||||
|
@ -892,10 +888,6 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
a.installEventFilter(TApp::instance());
|
||||
|
||||
// Disable the layout temporarily to avoid redistribution of panes that is
|
||||
// executed during resizeEvents that are being called. It will reenable when
|
||||
// the resizeEvent() is called
|
||||
w.getCurrentRoom()->dockLayout()->setEnabled(false);
|
||||
int ret = a.exec();
|
||||
|
||||
TUndoManager::manager()->reset();
|
||||
|
|
|
@ -641,9 +641,12 @@ void PaletteViewer::updateSavePaletteToolBar() {
|
|||
if (levelType == PLT_XSHLEVEL) enable = false;
|
||||
}
|
||||
act->setEnabled(enable);
|
||||
} else if (m_viewType != STUDIO_PALETTE && i == 1) // move action
|
||||
actions[i]->setVisible(enable);
|
||||
else
|
||||
} else if (m_viewType != STUDIO_PALETTE && i == 1) { // move action
|
||||
// Do not hide when palette is not visible otherwise it causes
|
||||
// panel redistribution at startup
|
||||
bool moveVisible = isVisible() ? enable : true;
|
||||
actions[i]->setVisible(moveVisible);
|
||||
} else
|
||||
actions[i]->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,11 +106,7 @@ void TMainWindow::setSeparatorsThickness(int thick) {
|
|||
|
||||
//----------------------------------------
|
||||
|
||||
void TMainWindow::resizeEvent(QResizeEvent *event) {
|
||||
// see main.cpp for why we are doing this
|
||||
if (m_layout->isEnabled()) m_layout->redistribute();
|
||||
m_layout->setEnabled(true);
|
||||
}
|
||||
void TMainWindow::resizeEvent(QResizeEvent *event) { m_layout->redistribute(); }
|
||||
|
||||
//========================================================================
|
||||
|
||||
|
|
Loading…
Reference in a new issue