Merge pull request #4743 from steelman/horizontal-snap-widget

Draft: Ensure horizontal orientation of snap_widget
This commit is contained in:
Yorik van Havre
2021-04-20 11:49:09 +02:00
committed by GitHub

View File

@@ -340,6 +340,7 @@ def init_draft_statusbar_snap():
# add snap widget to the statusbar
sb.insertPermanentWidget(2, snap_widget)
snap_widget.setOrientation(QtCore.Qt.Orientation.Horizontal)
snap_widget.show()
@@ -373,11 +374,13 @@ def show_draft_statusbar():
snap_widget = sb.findChild(QtGui.QToolBar,"draft_snap_widget")
if snap_widget:
snap_widget.setOrientation(QtCore.Qt.Orientation.Horizontal)
snap_widget.show()
else:
snap_widget = mw.findChild(QtGui.QToolBar,"draft_snap_widget")
if snap_widget:
sb.insertPermanentWidget(2, snap_widget)
snap_widget.setOrientation(QtCore.Qt.Orientation.Horizontal)
snap_widget.show()
elif params.GetBool("DisplayStatusbarSnapWidget", True):
t = QtCore.QTimer()