mirror of https://github.com/Syncplay/syncplay
* Fix #504 disconnected monitor bug
This commit is contained in:
parent
1404d58740
commit
e4322e1093
|
@ -2057,7 +2057,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
settings = QSettings("Syncplay", "MainWindow")
|
||||
settings.beginGroup("MainWindow")
|
||||
self.resize(settings.value("size", QSize(700, 500)))
|
||||
self.move(settings.value("pos", QPoint(200, 200)))
|
||||
movePos = settings.value("pos", QPoint(200, 200))
|
||||
windowGeometry = QtWidgets.QApplication.desktop().availableGeometry(self)
|
||||
posIsOnScreen = windowGeometry.contains(QtCore.QRect(movePos.x(), movePos.y(), 1, 1))
|
||||
if not posIsOnScreen:
|
||||
movePos = QPoint(200,200)
|
||||
self.move(movePos)
|
||||
if settings.value("showPlaybackButtons", "false") == "true":
|
||||
self.playbackAction.setChecked(True)
|
||||
self.updatePlaybackFrameVisibility()
|
||||
|
|
Loading…
Reference in New Issue