Skip to content
Snippets Groups Projects

Legge til støtte for zoom med CTRL + scroll

Merged Thomas Holene Løkkeborg requested to merge zoom-fiks into master
All threads resolved!
1 file
+ 12
0
Compare changes
  • Side-by-side
  • Inline
@@ -172,6 +172,14 @@ class ProxyLabelWithCustomQPrintText(QGraphicsProxyWidget):
class InlineEditableSOIView(QScrollArea):
"""Widget that allows for "inline" editing of an SOI. Also prints to PDF.
## Important note about QScrollArea superclass
This class was originally derived from QScrollArea for scrolling, but it
turns out QGrapihcsView has it's own scrolling. We are using
QGraphicsView's scrolling instead. This class does not need to inherit from
QScrollArea, but because of time pressure we have decided not to refactor
this.
Parameters
----------
soi : soitool.soi.SOI
@@ -228,6 +236,10 @@ class InlineEditableSOIView(QScrollArea):
self.soi.add_new_module_listener(self.ensure_proxies)
self.soi.add_update_property_listener(self.update_pages)
# Initial position of scrollbars should be upper-left
self.view.verticalScrollBar().setValue(1)
self.view.horizontalScrollBar().setValue(1)
def is_widget_in_scene(self, widget):
"""Indicate wether given widget already has a proxy in the scene."""
for proxy in self.proxies:
Loading