Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bachelor-paa-bittet
soitool
Merge requests
!92
Legge til støtte for zoom med CTRL + scroll
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Legge til støtte for zoom med CTRL + scroll
zoom-fiks
into
master
Overview
5
Commits
12
Pipelines
12
Changes
2
Merged
Thomas Holene Løkkeborg
requested to merge
zoom-fiks
into
master
4 years ago
Overview
5
Commits
12
Pipelines
12
Changes
1
Expand
0
0
Merge request reports
Viewing commit
c2c60a8f
Prev
Next
Show latest version
1 file
+
5
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
c2c60a8f
#161 lint fiks
· c2c60a8f
Thomas Holene Løkkeborg
authored
4 years ago
soitool/inline_editable_soi_view.py
+
5
−
2
Options
@@ -767,8 +767,11 @@ class InlineEditableSOIView(QScrollArea):
current_scale
=
self
.
get_current_scale
()
# Only zoom if we are not breaching the minimum and maximum range
new_scale
=
current_scale
+
zoom_increment
if
new_scale
>
ZOOM_LEVEL_MINIMUM
and
new_scale
<
ZOOM_LEVEL_MAXIMUM
:
if
(
ZOOM_LEVEL_MINIMUM
<
current_scale
+
zoom_increment
<
ZOOM_LEVEL_MAXIMUM
):
# We need a scalar such that:
# current_scale * scalar = current_scale + zoom_increment
scalar
=
(
current_scale
+
zoom_increment
)
/
current_scale
Loading