From c7e0d37b48f611e7066fb0e7e28230d179a59fa4 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Sat, 26 Nov 2016 22:58:02 +0100 Subject: [PATCH] don't allow shortcuts to be added to steam if there aren't any --- GloSC/GloSC.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GloSC/GloSC.cpp b/GloSC/GloSC.cpp index fff9edb..d5985a7 100644 --- a/GloSC/GloSC.cpp +++ b/GloSC/GloSC.cpp @@ -175,6 +175,13 @@ void GloSC::on_pbDelete_clicked() void GloSC::on_pbAddToSteam_clicked() { + + if (ui.lwInstances->count() <= 0) + { + QMessageBox::information(this, "GloSC", "No shortcuts! Create some shortcuts first for them to be added to Steam!", QMessageBox::Ok); + return; + } + QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Valve\\Steam", QSettings::NativeFormat); QString steamPath = settings.value("SteamPath").toString(); QString activeUser = settings.value("ActiveProcess/ActiveUser").toString();