From 2bbeb980055490abc64d37c1e5221fed836e0c5b Mon Sep 17 00:00:00 2001 From: Syping Date: Wed, 23 Aug 2017 07:06:14 +0200 Subject: [PATCH] fix UI bug --- ProfileInterface.cpp | 36 ++++++++++++------------------------ config.h | 2 +- res/app.rc | 8 ++++---- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp index 4ce95af..2780cdd 100755 --- a/ProfileInterface.cpp +++ b/ProfileInterface.cpp @@ -1079,22 +1079,16 @@ void ProfileInterface::contextMenuTriggeredPIC(QContextMenuEvent *ev) contextMenu.addMenu(&editMenu); contextMenu.addMenu(&exportMenu); contextMenu.addAction(SnapmaticWidget::tr("&Remove"), picWidget, SLOT(on_cmdDelete_clicked())); - if (picWidget->isSelected()) + contextMenu.addSeparator(); + if (!picWidget->isSelected()) { contextMenu.addAction(SnapmaticWidget::tr("&Select"), picWidget, SLOT(pictureSelected())); } + if (picWidget->isSelected()) { contextMenu.addAction(SnapmaticWidget::tr("&Deselect"), picWidget, SLOT(pictureSelected())); } + if (selectedWidgets() != widgets.count()) { - contextMenu.addSeparator(); - if (!picWidget->isSelected()) { contextMenu.addAction(SnapmaticWidget::tr("&Select"), picWidget, SLOT(pictureSelected())); } - if (picWidget->isSelected()) { contextMenu.addAction(SnapmaticWidget::tr("&Deselect"), picWidget, SLOT(pictureSelected())); } contextMenu.addAction(SnapmaticWidget::tr("Select &All"), picWidget, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A")); - if (selectedWidgets() != 0) - { - contextMenu.addAction(SnapmaticWidget::tr("&Deselect All"), picWidget, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D")); - } } - else + if (selectedWidgets() != 0) { - contextMenu.addSeparator(); - contextMenu.addAction(SnapmaticWidget::tr("&Select"), picWidget, SLOT(pictureSelected())); - contextMenu.addAction(SnapmaticWidget::tr("Select &All"), picWidget, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A")); + contextMenu.addAction(SnapmaticWidget::tr("&Deselect All"), picWidget, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D")); } contextMenu.exec(ev->globalPos()); } @@ -1106,22 +1100,16 @@ void ProfileInterface::contextMenuTriggeredSGD(QContextMenuEvent *ev) contextMenu.addAction(SavegameWidget::tr("&View"), sgdWidget, SLOT(on_cmdView_clicked())); contextMenu.addAction(SavegameWidget::tr("&Export"), sgdWidget, SLOT(on_cmdCopy_clicked())); contextMenu.addAction(SavegameWidget::tr("&Remove"), sgdWidget, SLOT(on_cmdDelete_clicked())); - if (sgdWidget->isSelected()) + contextMenu.addSeparator(); + if (!sgdWidget->isSelected()) { contextMenu.addAction(SavegameWidget::tr("&Select"), sgdWidget, SLOT(savegameSelected())); } + if (sgdWidget->isSelected()) { contextMenu.addAction(SavegameWidget::tr("&Deselect"), sgdWidget, SLOT(savegameSelected())); } + if (selectedWidgets() != widgets.count()) { - contextMenu.addSeparator(); - if (!sgdWidget->isSelected()) { contextMenu.addAction(SavegameWidget::tr("&Select"), this, SLOT(savegameSelected())); } - if (sgdWidget->isSelected()) { contextMenu.addAction(SavegameWidget::tr("&Deselect"), this, SLOT(savegameSelected())); } contextMenu.addAction(SavegameWidget::tr("Select &All"), sgdWidget, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A")); - if (selectedWidgets() != 0) - { - contextMenu.addAction(SavegameWidget::tr("&Deselect All"), sgdWidget, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D")); - } } - else + if (selectedWidgets() != 0) { - contextMenu.addSeparator(); - contextMenu.addAction(SavegameWidget::tr("&Select"), sgdWidget, SLOT(savegameSelected())); - contextMenu.addAction(SavegameWidget::tr("Select &All"), sgdWidget, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A")); + contextMenu.addAction(SavegameWidget::tr("&Deselect All"), sgdWidget, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D")); } contextMenu.exec(ev->globalPos()); } diff --git a/config.h b/config.h index 524652e..a159ce9 100755 --- a/config.h +++ b/config.h @@ -50,7 +50,7 @@ #ifndef GTA5SYNC_APPVER #ifndef GTA5SYNC_DAILYB -#define GTA5SYNC_APPVER "1.3.3" +#define GTA5SYNC_APPVER "1.3.4" #else #define GTA5SYNC_APPVER QString("%1").arg(GTA5SYNC_DAILYB) #endif diff --git a/res/app.rc b/res/app.rc index c29043b..7a643e1 100755 --- a/res/app.rc +++ b/res/app.rc @@ -7,8 +7,8 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gta5view.exe.manifest" #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 1, 3, 3, 0 -PRODUCTVERSION 1, 3, 3, 0 +FILEVERSION 1, 3, 4, 0 +PRODUCTVERSION 1, 3, 4, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Syping" VALUE "FileDescription", "gta5view\0" - VALUE "FileVersion", "1.3.3\0" + VALUE "FileVersion", "1.3.4\0" VALUE "InternalName", "gta5view\0" VALUE "LegalCopyright", "Copyright © 2016-2017 Syping\0" VALUE "OriginalFilename", "gta5view.exe\0" VALUE "ProductName", "gta5view\0" - VALUE "ProductVersion", "1.3.3\0" + VALUE "ProductVersion", "1.3.4\0" END END END