Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
ff669f25
Commit
ff669f25
authored
Jul 04, 2011
by
Sune Vuorela
Browse files
make pasting from selection work in text tool.
BUG: 269608 REVIEW: 101845
parent
a5be60f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/textshape/TextTool.cpp
View file @
ff669f25
...
...
@@ -721,8 +721,16 @@ void TextTool::mousePressEvent(KoPointerEvent *event)
event
->
ignore
();
}
if
(
event
->
button
()
==
Qt
::
MidButton
)
// Paste
paste
();
if
(
event
->
button
()
==
Qt
::
MidButton
)
{
// Paste
const
QMimeData
*
data
=
QApplication
::
clipboard
()
->
mimeData
(
QClipboard
::
Selection
);
// on windows we do not have data if we try to paste this selection
if
(
data
)
{
m_prevCursorPosition
=
m_textEditor
.
data
()
->
position
();
m_textEditor
.
data
()
->
addCommand
(
new
TextPasteCommand
(
QClipboard
::
Selection
,
this
));
editingPluginEvents
();
}
}
}
const
QTextCursor
TextTool
::
cursor
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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