Piano-roll: bypass fixed initial width of the window

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
NoiseByNorthwest
2012-02-01 15:10:52 +01:00
committed by Tobias Doerffel
parent a6ae31a08e
commit 59242adadc

View File

@@ -76,7 +76,6 @@ extern Keys whiteKeys[]; // defined in piano_widget.cpp
// some constants...
const int INITIAL_PIANOROLL_WIDTH = 840;
const int INITIAL_PIANOROLL_HEIGHT = 480;
const int SCROLLBAR_SIZE = 16;
@@ -600,13 +599,13 @@ pianoRoll::pianoRoll() :
if( engine::mainWindow()->workspace() )
{
engine::mainWindow()->workspace()->addSubWindow( this );
parentWidget()->resize( INITIAL_PIANOROLL_WIDTH,
parentWidget()->resize( tb_layout->minimumSize().width(),
INITIAL_PIANOROLL_HEIGHT );
parentWidget()->hide();
}
else
{
resize( INITIAL_PIANOROLL_WIDTH, INITIAL_PIANOROLL_HEIGHT );
resize( tb_layout->minimumSize().width(), INITIAL_PIANOROLL_HEIGHT );
hide();
}