#include "wx/hash.h"
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/math.h"
#include "wx/event.h"
#include "wx/window.h"
#include "wx/panel.h"
// Here we use high-quality wxImage scaling functions available
wxImage img = bmp.ConvertToImage();
double scaleY = (double)maxSz.y / (double)imSz.y;
- img.Rescale(((double)bmp.GetWidth())*scaleY,
- ((double)bmp.GetHeight())*scaleY,
+ img.Rescale(wxRound(bmp.GetWidth()*scaleY),
+ wxRound(bmp.GetHeight()*scaleY),
wxIMAGE_QUALITY_HIGH);
wxBitmap* bmpNew = new wxBitmap(img, 32);
#else
}
}
-bool wxPGProperty::IsChildSelected() const
+bool wxPGProperty::IsChildSelected( bool recursive ) const
{
size_t i;
for ( i = 0; i < GetChildCount(); i++ )
{
- if ( m_parentState->DoIsPropertySelected( Item(i) ) )
+ wxPGProperty* child = Item(i);
+
+ // Test child
+ if ( m_parentState->DoIsPropertySelected( child ) )
+ return true;
+
+ // Test sub-childs
+ if ( recursive && child->IsChildSelected( recursive ) )
return true;
}