Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
140d2447
Commit
140d2447
authored
Jul 18, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Long press doesn't switch play and selector tools if cache widget is enabled.
parent
b4ae04d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
UBBoardController.cpp
src/board/UBBoardController.cpp
+8
-0
UBBoardController.h
src/board/UBBoardController.h
+2
-0
UBBoardView.cpp
src/board/UBBoardView.cpp
+2
-1
No files found.
src/board/UBBoardController.cpp
View file @
140d2447
...
@@ -88,6 +88,7 @@ UBBoardController::UBBoardController(UBMainWindow* mainWindow)
...
@@ -88,6 +88,7 @@ UBBoardController::UBBoardController(UBMainWindow* mainWindow)
,
mIsClosing
(
false
)
,
mIsClosing
(
false
)
,
mSystemScaleFactor
(
1.0
)
,
mSystemScaleFactor
(
1.0
)
,
mCleanupDone
(
false
)
,
mCleanupDone
(
false
)
,
mCacheWidgetIsEnabled
(
false
)
{
{
mZoomFactor
=
UBSettings
::
settings
()
->
boardZoomFactor
->
get
().
toDouble
();
mZoomFactor
=
UBSettings
::
settings
()
->
boardZoomFactor
->
get
().
toDouble
();
...
@@ -399,6 +400,11 @@ void UBBoardController::stopScript()
...
@@ -399,6 +400,11 @@ void UBBoardController::stopScript()
freezeW3CWidgets
(
true
);
freezeW3CWidgets
(
true
);
}
}
bool
UBBoardController
::
cacheIsVisible
()
{
return
mCacheWidgetIsEnabled
;
}
void
UBBoardController
::
initToolbarTexts
()
void
UBBoardController
::
initToolbarTexts
()
{
{
QList
<
QAction
*>
allToolbarActions
;
QList
<
QAction
*>
allToolbarActions
;
...
@@ -1685,6 +1691,8 @@ void UBBoardController::notifyCache(bool visible)
...
@@ -1685,6 +1691,8 @@ void UBBoardController::notifyCache(bool visible)
{
{
emit
cacheDisabled
();
emit
cacheDisabled
();
}
}
mCacheWidgetIsEnabled
=
visible
;
}
}
void
UBBoardController
::
updatePageSizeState
()
void
UBBoardController
::
updatePageSizeState
()
...
...
src/board/UBBoardController.h
View file @
140d2447
...
@@ -222,6 +222,7 @@ class UBBoardController : public QObject
...
@@ -222,6 +222,7 @@ class UBBoardController : public QObject
void
freezeW3CWidget
(
QGraphicsItem
*
item
,
bool
freeze
);
void
freezeW3CWidget
(
QGraphicsItem
*
item
,
bool
freeze
);
void
startScript
();
void
startScript
();
void
stopScript
();
void
stopScript
();
bool
cacheIsVisible
();
signals
:
signals
:
void
newPageAdded
();
void
newPageAdded
();
...
@@ -282,6 +283,7 @@ class UBBoardController : public QObject
...
@@ -282,6 +283,7 @@ class UBBoardController : public QObject
qreal
mSystemScaleFactor
;
qreal
mSystemScaleFactor
;
bool
mCleanupDone
;
bool
mCleanupDone
;
QMap
<
QAction
*
,
QPair
<
QString
,
QString
>
>
mActionTexts
;
QMap
<
QAction
*
,
QPair
<
QString
,
QString
>
>
mActionTexts
;
bool
mCacheWidgetIsEnabled
;
private
slots
:
private
slots
:
void
stylusToolDoubleClicked
(
int
tool
);
void
stylusToolDoubleClicked
(
int
tool
);
...
...
src/board/UBBoardView.cpp
View file @
140d2447
...
@@ -729,7 +729,8 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
...
@@ -729,7 +729,8 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
movingItem
=
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()));
movingItem
=
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()));
connect
(
&
mLongPressTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
longPressEvent
()));
connect
(
&
mLongPressTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
longPressEvent
()));
mLongPressTimer
.
start
();
if
(
!
movingItem
&&
!
mController
->
cacheIsVisible
())
mLongPressTimer
.
start
();
if
(
!
movingItem
)
{
if
(
!
movingItem
)
{
// Rubberband selection implementation
// Rubberband selection implementation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment