Skip to content

Commit

Permalink
Apply fix for ticket #3236, provided by NathanW
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14736 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 22, 2010
1 parent dccbded commit df92883
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions python/core/qgscomposeritem.sip
Expand Up @@ -5,6 +5,29 @@ class QgsComposerItem: QObject, QGraphicsRectItem
{
%TypeHeaderCode
#include <qgscomposeritem.h>
#include <qgscomposerlabel.h>
#include <qgscomposerlegend.h>
#include <qgscomposermap.h>
#include <qgscomposerpicture.h>
#include <qgscomposerscalebar.h>
#include <qgscomposershape.h>
%End

%ConvertToSubClassCode
if (dynamic_cast<QgsComposerLabel*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerLabel;
else if (dynamic_cast<QgsComposerLegend*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerLegend;
else if (dynamic_cast<QgsComposerMap*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerMap;
else if (dynamic_cast<QgsComposerPicture*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerPicture;
else if (dynamic_cast<QgsComposerScaleBar*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerScaleBar;
else if (dynamic_cast<QgsComposerShape*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerShape;
else
sipClass = 0;
%End

public:
Expand Down

0 comments on commit df92883

Please sign in to comment.