Optimize loading of skips when there are no skips in the view.

This commit is contained in:
Ernie Pasveer
2025-04-05 09:49:56 -05:00
parent 6853679a4a
commit 1f62330311
+7 -4
View File
@@ -198,11 +198,14 @@ void SeerSkipBrowserWidget::handleSaveToolButton () {
void SeerSkipBrowserWidget::handleLoadToolButton () {
int result = QMessageBox::warning(this, "Seer",
QString("Load the previously saved skips from settings?\n\nThe existing skips in the view will be deleted first."),
QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::Cancel);
// Warn only if there are existing skips in the view.
if (skipTreeWidget->topLevelItemCount() > 0) {
int result = QMessageBox::warning(this, "Seer",
QString("Load the previously saved skips from settings?\n\nThe existing skips in the view will be deleted first."),
QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::Cancel);
if (result == QMessageBox::Cancel) return;
if (result == QMessageBox::Cancel) return;
}
QSettings settings;