Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KMag
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Accessibility
KMag
Commits
ec921f0a
Commit
ec921f0a
authored
Oct 03, 2014
by
Christoph Feck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent recursive zooming
BUG: 328779 FIXED-IN: 4.14.2
parent
7b5e381b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
kmagzoomview.cpp
kmagzoomview.cpp
+23
-0
No files found.
kmagzoomview.cpp
View file @
ec921f0a
...
...
@@ -970,6 +970,29 @@ void KMagZoomView::grabFrame()
if
(
m_colormode
!=
0
)
m_coloredPixmap
=
QPixmap
::
fromImage
(
ColorSim
::
recolor
(
m_coloredPixmap
.
toImage
(),
m_colormode
));
// erase background covered by kmag view ...
QRect
viewRect
=
rect
();
viewRect
.
translate
(
mapTo
(
window
(),
QPoint
(
0
,
0
)));
viewRect
.
translate
(
-
selRect
.
topLeft
());
viewRect
.
translate
(
window
()
->
geometry
().
topLeft
());
QRegion
region
(
viewRect
);
// ... but exclude own popups ...
const
QList
<
QWidget
*>
siblings
=
QApplication
::
topLevelWidgets
();
foreach
(
QWidget
*
sibling
,
siblings
)
{
if
(
sibling
!=
window
()
&&
(
sibling
->
windowType
()
&
Qt
::
Window
)
&&
sibling
->
isVisible
())
{
QRect
rect
=
sibling
->
frameGeometry
();
rect
.
translate
(
-
selRect
.
topLeft
());
region
-=
rect
;
}
}
QPainter
p
(
&
m_coloredPixmap
);
foreach
(
const
QRect
&
rect
,
region
.
rects
())
{
p
.
fillRect
(
rect
,
palette
().
dark
());
}
p
.
end
();
QRect
r
=
m_zoomMatrix
.
mapRect
(
m_coloredPixmap
.
rect
());
// call repaint to display the newly grabbed image
horizontalScrollBar
()
->
setPageStep
(
r
.
width
());
...
...
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