show error message when open deck fails in VDS (#5642)

This commit is contained in:
RickyRister 2025-02-25 15:33:16 -08:00 committed by GitHub
parent 47311b1dfd
commit 345f8b772c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@
#include "../tab_supervisor.h" #include "../tab_supervisor.h"
#include "pb/command_deck_del.pb.h" #include "pb/command_deck_del.pb.h"
#include <QMessageBox>
#include <QMouseEvent> #include <QMouseEvent>
TabDeckStorageVisual::TabDeckStorageVisual(TabSupervisor *_tabSupervisor) TabDeckStorageVisual::TabDeckStorageVisual(TabSupervisor *_tabSupervisor)
@ -26,6 +27,7 @@ void TabDeckStorageVisual::actOpenLocalDeck(const QString &filePath)
{ {
DeckLoader deckLoader; DeckLoader deckLoader;
if (!deckLoader.loadFromFile(filePath, DeckLoader::getFormatFromName(filePath), true)) { if (!deckLoader.loadFromFile(filePath, DeckLoader::getFormatFromName(filePath), true)) {
QMessageBox::critical(this, tr("Error"), tr("Could not open deck at %1").arg(filePath));
return; return;
} }