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
c7b36441
Commit
c7b36441
authored
May 30, 2013
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text is not selected on page load
parent
fbd63063
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
UBBoardView.cpp
src/board/UBBoardView.cpp
+1
-0
UBGraphicsTextItem.cpp
src/domain/UBGraphicsTextItem.cpp
+8
-1
UBGraphicsTextItem.h
src/domain/UBGraphicsTextItem.h
+1
-1
No files found.
src/board/UBBoardView.cpp
View file @
c7b36441
...
...
@@ -1288,6 +1288,7 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
textItem
->
setTextInteractionFlags
(
Qt
::
TextEditorInteraction
);
textItem
->
setSelected
(
true
);
textItem
->
setFocus
();
}
...
...
src/domain/UBGraphicsTextItem.cpp
View file @
c7b36441
...
...
@@ -89,6 +89,8 @@ QVariant UBGraphicsTextItem::itemChange(GraphicsItemChange change, const QVarian
void
UBGraphicsTextItem
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
setTextInteractionFlags
(
Qt
::
TextEditorInteraction
);
// scene()->itemAt(pos) returns 0 if pos is not over text, but over text item, but mouse press comes.
// It is a cludge...
if
(
UBStylusTool
::
Play
==
UBDrawingController
::
drawingController
()
->
stylusTool
())
...
...
@@ -145,7 +147,6 @@ void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
if
(
mMultiClickState
==
1
)
{
// setTextInteractionFlags(Qt::TextEditorInteraction);
QGraphicsTextItem
::
mousePressEvent
(
event
);
setFocus
();
}
...
...
@@ -355,3 +356,9 @@ void UBGraphicsTextItem::documentSizeChanged(const QSizeF & newSize)
{
resize
(
newSize
.
width
(),
newSize
.
height
());
}
void
UBGraphicsTextItem
::
setHtml
(
const
QString
&
text
)
{
QGraphicsTextItem
::
setHtml
(
text
);
setTextInteractionFlags
(
Qt
::
NoTextInteraction
);
}
src/domain/UBGraphicsTextItem.h
View file @
c7b36441
...
...
@@ -90,6 +90,7 @@ class UBGraphicsTextItem : public QGraphicsTextItem, public UBItem, public UBRes
virtual
void
clearSource
(){;}
virtual
void
setUuid
(
const
QUuid
&
pUuid
);
void
setHtml
(
const
QString
&
text
);
signals
:
void
textUndoCommandAdded
(
UBGraphicsTextItem
*
textItem
);
...
...
@@ -107,7 +108,6 @@ class UBGraphicsTextItem : public QGraphicsTextItem, public UBItem, public UBRes
virtual
QVariant
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
);
private
:
qreal
mTextHeight
;
int
mMultiClickState
;
...
...
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