Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f133d0ac
Commit
f133d0ac
authored
Feb 08, 2010
by
Marco Bubke
Browse files
Improve undo/redo for move by cursor key
parent
3aa10a74
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp
View file @
f133d0ac
...
...
@@ -345,6 +345,16 @@ void MoveManipulator::moveBy(double deltaX, double deltaY)
}
}
void
MoveManipulator
::
beginRewriterTransaction
()
{
m_rewriterTransaction
=
m_view
->
beginRewriterTransaction
();
}
void
MoveManipulator
::
endRewriterTransaction
()
{
m_rewriterTransaction
.
commit
();
}
void
MoveManipulator
::
setOpacityForAllElements
(
qreal
opacity
)
{
foreach
(
FormEditorItem
*
item
,
m_itemList
)
...
...
src/plugins/qmldesigner/components/formeditor/movemanipulator.h
View file @
f133d0ac
...
...
@@ -69,6 +69,9 @@ public:
void
moveBy
(
double
deltaX
,
double
deltaY
);
void
beginRewriterTransaction
();
void
endRewriterTransaction
();
QPointF
beginPoint
()
const
;
void
clear
();
...
...
src/plugins/qmldesigner/components/formeditor/movetool.cpp
View file @
f133d0ac
...
...
@@ -156,6 +156,7 @@ void MoveTool::keyPressEvent(QKeyEvent *event)
m_moveManipulator
.
setItems
(
movableItems
);
// m_selectionIndicator.hide();
m_resizeIndicator
.
hide
();
m_moveManipulator
.
beginRewriterTransaction
();
}
switch
(
event
->
key
())
{
...
...
@@ -180,6 +181,7 @@ void MoveTool::keyReleaseEvent(QKeyEvent *keyEvent)
}
if
(
!
keyEvent
->
isAutoRepeat
())
{
m_moveManipulator
.
beginRewriterTransaction
();
m_moveManipulator
.
clear
();
// m_selectionIndicator.show();
m_resizeIndicator
.
show
();
...
...
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