X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cbc57f086cee690f397ac5622d3f1d7153b300e..69379916942701f59b6fff72dd09eaa0a9aba89c:/contrib/src/fl/rowlayoutpl.cpp diff --git a/contrib/src/fl/rowlayoutpl.cpp b/contrib/src/fl/rowlayoutpl.cpp index 034284c6c4..84bdc7e111 100644 --- a/contrib/src/fl/rowlayoutpl.cpp +++ b/contrib/src/fl/rowlayoutpl.cpp @@ -120,9 +120,13 @@ void cbRowLayoutPlugin::ExpandNotFixedBars( cbRowInfo* pRow ) { ApplyLengthRatios( pRow ); + #if 1 + // FIXME:: something's wrong? return; + #else + double freeSpc = (double)GetRowFreeSpace( pRow ); // calculate sum of precents @@ -156,14 +160,18 @@ void cbRowLayoutPlugin::ExpandNotFixedBars( cbRowInfo* pRow ) bar.mBounds.x = curX; curX = bar.mBounds.x + bar.mBounds.width; } + #endif } -void cbRowLayoutPlugin::AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pTheBar ) +void cbRowLayoutPlugin::AdjustLengthOfInserted( cbRowInfo* WXUNUSED(pRow), cbBarInfo* WXUNUSED(pTheBar) ) { - return; // TBD: Makes following code unreachable + return; - // pTheBar is not-fixed +#if 0 + // TBD: Makes following code unreachable + + // pTheBar is not-fixed // FIXME:: what is this for?? @@ -203,6 +211,9 @@ void cbRowLayoutPlugin::AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pThe pTheBar->mBounds.width = freeSpc * (1.0 - pcntSum); #endif + +#endif + } void cbRowLayoutPlugin::FitBarsToRange( int from, int till, @@ -433,6 +444,9 @@ void cbRowLayoutPlugin::ApplyLengthRatios( cbRowInfo* pRow ) // look like total of mLetRatio's is 1.0, thus original // len. ratios are _preserved_: + if (pcntSum == 0.0) + pcntSum = 1.0; + double unit = freeSpc / pcntSum; bool haveSquished = FALSE; @@ -664,7 +678,7 @@ void cbRowLayoutPlugin::SlideRightSideBars( cbBarInfo* pTheBar ) } } -void cbRowLayoutPlugin::ShiftLeftTrashold( cbBarInfo* pTheBar, cbRowInfo& row ) +void cbRowLayoutPlugin::ShiftLeftTrashold( cbBarInfo* WXUNUSED(pTheBar), cbRowInfo& row ) { wxRect& first = row.mBars[0]->mBounds; @@ -1035,6 +1049,7 @@ void cbRowLayoutPlugin::OnLayoutRows( cbLayoutRowsEvent& event ) for ( i = 0; i != mpPane->GetRowList().Count(); ++i ) { cbRowInfo& row = *mpPane->GetRowList()[ i ]; + //mpPane->CalcLengthRatios(& row); // setup "has-handle" flags for rows, which depend on the existance // of not-fixed bars in the row