Long press doesn't switch play and selector tools if cache widget is enabled.

preferencesAboutTextFull
Aleksei Kanash 13 years ago
parent b4ae04d09a
commit 140d2447ba
  1. 8
      src/board/UBBoardController.cpp
  2. 2
      src/board/UBBoardController.h
  3. 1
      src/board/UBBoardView.cpp

@ -88,6 +88,7 @@ UBBoardController::UBBoardController(UBMainWindow* mainWindow)
, mIsClosing(false)
, mSystemScaleFactor(1.0)
, mCleanupDone(false)
, mCacheWidgetIsEnabled(false)
{
mZoomFactor = UBSettings::settings()->boardZoomFactor->get().toDouble();
@ -399,6 +400,11 @@ void UBBoardController::stopScript()
freezeW3CWidgets(true);
}
bool UBBoardController::cacheIsVisible()
{
return mCacheWidgetIsEnabled;
}
void UBBoardController::initToolbarTexts()
{
QList<QAction*> allToolbarActions;
@ -1685,6 +1691,8 @@ void UBBoardController::notifyCache(bool visible)
{
emit cacheDisabled();
}
mCacheWidgetIsEnabled = visible;
}
void UBBoardController::updatePageSizeState()

@ -222,6 +222,7 @@ class UBBoardController : public QObject
void freezeW3CWidget(QGraphicsItem* item, bool freeze);
void startScript();
void stopScript();
bool cacheIsVisible();
signals:
void newPageAdded();
@ -282,6 +283,7 @@ class UBBoardController : public QObject
qreal mSystemScaleFactor;
bool mCleanupDone;
QMap<QAction*, QPair<QString, QString> > mActionTexts;
bool mCacheWidgetIsEnabled;
private slots:
void stylusToolDoubleClicked(int tool);

@ -729,6 +729,7 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent()));
if (!movingItem && !mController->cacheIsVisible())
mLongPressTimer.start();
if (!movingItem) {

Loading…
Cancel
Save