def mousePressEvent(self, event):
        #print "FixedRatioRectItem_cutom::mousePressEvent"
        if event.button() & Qt.RightButton != 0:
            w=self._rect.width()
            h=self._rect.height()
            centre_x=self._rect.center().x()
            centre_y=self._rect.center().y()
            ratio=self._rect.width()/self._rect.height()

            self._resize = True
            self._resize_start = event.scenePos()
            self._resize_start_rect = QRectF(self._rect)
            self._upper_half_clicked = (event.scenePos().y() < self._resize_start_rect.center().y())
            self._left_half_clicked  = (event.scenePos().x() < self._resize_start_rect.center().x())
            event.accept()
            #new_w=self._resize_start_rect.width()
            #new_h=new_w/ratio
            #x = centre_x - new_w/2
            #y = centre_y - new_h/2
            #rect = QRectF(QPointF(x,y), QSizeF(new_w, new_h)).normalized()
            #self._updateRect(rect)
            #self.updateModel()
            #event.accept()
        else:
            BaseItem.mousePressEvent(self, event)