Skip to content

Commit 9d7cfd1

Browse files
committed
check if file path not empty!
1 parent 6ffb9e3 commit 9d7cfd1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

QtPyHammer/ui/compile.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from PyQt5 import QtCore, QtGui, QtWidgets
22

33
from ..utilities import lang
4+
from ..ui import popup
45
import subprocess
56

67
class browser(QtWidgets.QDialog):
@@ -70,6 +71,10 @@ def on_ok_clicked(self):
7071
game_path = r'C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf'
7172
file_path = self.textbox.text()
7273

74+
if not file_path:
75+
no_text_popup = popup.browser(parent=self, popuptext="Error", msgtext="File path cannot be empty")
76+
no_text_popup.show()
77+
return
7378
bsp_index = self.bsp_combo_box.currentIndex()
7479
vis_index = self.vis_combo_box.currentIndex()
7580
rad_index = self.rad_combo_box.currentIndex()

0 commit comments

Comments
 (0)