mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix crash if log window is open when entering mission.
Use signal to append text to LogWindow to avoid crash from crossing thread boundaries. Change modal flag to enable interacting with LogWindow while the mission is running Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1493
This commit is contained in:
@@ -2,11 +2,11 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from typing import Sized
|
||||
from typing import Sized, Optional
|
||||
|
||||
from PySide2 import QtCore
|
||||
from PySide2.QtCore import QObject, Qt, Signal
|
||||
from PySide2.QtGui import QIcon, QMovie, QPixmap
|
||||
from PySide2.QtGui import QIcon, QMovie, QPixmap, QWindow
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QFileDialog,
|
||||
@@ -17,6 +17,7 @@ from PySide2.QtWidgets import (
|
||||
QMessageBox,
|
||||
QPushButton,
|
||||
QTextBrowser,
|
||||
QWidget,
|
||||
)
|
||||
from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
|
||||
@@ -49,9 +50,15 @@ DebriefingFileWrittenSignal()
|
||||
|
||||
|
||||
class QWaitingForMissionResultWindow(QDialog):
|
||||
def __init__(self, gameEvent: Event, game: Game, unit_map: UnitMap) -> None:
|
||||
super(QWaitingForMissionResultWindow, self).__init__()
|
||||
self.setModal(True)
|
||||
def __init__(
|
||||
self,
|
||||
gameEvent: Event,
|
||||
game: Game,
|
||||
unit_map: UnitMap,
|
||||
parent: Optional[QWidget] = None,
|
||||
) -> None:
|
||||
super(QWaitingForMissionResultWindow, self).__init__(parent=parent)
|
||||
self.setWindowModality(QtCore.Qt.WindowModal)
|
||||
self.gameEvent = gameEvent
|
||||
self.game = game
|
||||
self.unit_map = unit_map
|
||||
|
||||
Reference in New Issue
Block a user