Commit 140d2447 authored by Aleksei Kanash's avatar Aleksei Kanash

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

parent b4ae04d0
......@@ -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,7 +729,8 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent()));
mLongPressTimer.start();
if (!movingItem && !mController->cacheIsVisible())
mLongPressTimer.start();
if (!movingItem) {
// Rubberband selection implementation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment