- wxSize size = dialog->GetExtraControl()->GetSize();
- ioParams->customRect.right = size.x;
- ioParams->customRect.bottom = size.y;
+ SInt16 neededRight, neededBottom;
+
+ wxSize size = m_dialog->GetExtraControl()->GetSize();
+ neededRight = ioParams->customRect.left + size.x;
+ neededBottom = ioParams->customRect.top + size.y;
+
+ if (ioParams->customRect.right == 0 && ioParams->customRect.bottom == 0)
+ {
+ ioParams->customRect.right = neededRight;
+ ioParams->customRect.bottom = neededBottom;
+ }
+ else
+ {
+ if ( ioParams->customRect.right != m_lastRight )
+ {
+ if ( ioParams->customRect.right < neededRight )
+ ioParams->customRect.right = neededRight;
+ }
+ if ( ioParams->customRect.bottom != m_lastBottom )
+ {
+ if ( ioParams->customRect.bottom < neededBottom )
+ ioParams->customRect.bottom = neededBottom;
+ }
+ }
+ m_lastRight = ioParams->customRect.right;
+ m_lastBottom = ioParams->customRect.bottom;