Fixes the storage of the windows state for invisible windows
Until now windows/widgets that were invisible during the call to MainWindow::saveWidgetState had their size stored as (0, 0). This resulted in problems when the default template was created with invisible windows because in new projects these windows then opened up at a very small size. This patch fixes the problem by introducing a new parameter of type QSize to MainWindow::saveWidgetState. It can be used to communicate the size that should be stored in case the widget that calls the method is invisible. The code of most callers (PianoRollWindow, SongEditor, etc.) has been updated to use good default sizes.
This commit is contained in:
@@ -99,7 +99,7 @@ public:
|
||||
return m_keyMods.m_alt;
|
||||
}
|
||||
|
||||
static void saveWidgetState( QWidget * _w, QDomElement & _de );
|
||||
static void saveWidgetState( QWidget * _w, QDomElement & _de, QSize const & sizeIfInvisible = QSize(0, 0) );
|
||||
static void restoreWidgetState( QWidget * _w, const QDomElement & _de );
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user