fix: drag & drop folder support — install mod folders directly
This commit is contained in:
+10
-1
@@ -952,7 +952,16 @@ class ModManagerWindow(QMainWindow):
|
|||||||
def dropEvent(self, event: QDropEvent):
|
def dropEvent(self, event: QDropEvent):
|
||||||
for url in event.mimeData().urls():
|
for url in event.mimeData().urls():
|
||||||
filepath = url.toLocalFile()
|
filepath = url.toLocalFile()
|
||||||
if filepath:
|
if not filepath:
|
||||||
|
continue
|
||||||
|
|
||||||
|
path = Path(filepath)
|
||||||
|
if path.is_dir():
|
||||||
|
# Dropped a folder — install as mod from folder
|
||||||
|
installed, errors = install_mod_from_folder(path, self.config["game_path"])
|
||||||
|
total = sum(installed.values())
|
||||||
|
self.status.showMessage(f"Installed {total} files from {path.name}")
|
||||||
|
else:
|
||||||
self.install_mod(filepath)
|
self.install_mod(filepath)
|
||||||
|
|
||||||
# --- Top bar ---
|
# --- Top bar ---
|
||||||
|
|||||||
Reference in New Issue
Block a user