Frame size doesn't depends on zoom.

preferencesAboutTextFull
Aleksei Kanash 12 years ago
parent 523d2852ef
commit 13163fef30
  1. 7
      src/domain/UBGraphicsItemDelegate.cpp
  2. 2
      src/domain/UBGraphicsItemDelegate.h

@ -115,6 +115,7 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec
, mToolBarUsed(useToolBar) , mToolBarUsed(useToolBar)
{ {
// NOOP // NOOP
connect(UBApplication::boardController, SIGNAL(zoomChanged(qreal)), this, SLOT(onZoomChanged()));
} }
void UBGraphicsItemDelegate::init() void UBGraphicsItemDelegate::init()
@ -535,6 +536,12 @@ void UBGraphicsItemDelegate::commitUndoStep()
} }
} }
void UBGraphicsItemDelegate::onZoomChanged()
{
mAntiScaleRatio = 1 / (UBApplication::boardController->systemScaleFactor() * UBApplication::boardController->currentZoom());
positionHandles();
}
void UBGraphicsItemDelegate::buildButtons() void UBGraphicsItemDelegate::buildButtons()
{ {

@ -259,6 +259,8 @@ class UBGraphicsItemDelegate : public QObject
void increaseZlevelTop(); void increaseZlevelTop();
void increaseZlevelBottom(); void increaseZlevelBottom();
void onZoomChanged();
protected: protected:
virtual void buildButtons(); virtual void buildButtons();
virtual void decorateMenu(QMenu *menu); virtual void decorateMenu(QMenu *menu);

Loading…
Cancel
Save