Draft: Ensure horizontal orientation of snap_widget
From time to time when switching to other workbenches snap_widget changes orientation to vertical. Make sure it stays horizontal. Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user