Bug#986994: unblock: avogadrolibs/1.93.1-3
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package avogadrolibs
[ Reason ]
The current version of avogadrolibs/1.93.1-2 in testing has a bad bug,
where the Export Molecule option jumps back to the Save dialog box
after pressing Save, instead of closing the dialog box. The file is
in fact saved, but the bug degrades the user experience, making it
seem as if Export Molecule failed. The workaround has been to click
"Cancel" on the 2nd dialog box after first clicking "Save".
The bug was reported upstream at
https://github.com/OpenChemistry/avogadrolibs/issues/439
It has just been fixed in commit 68fb007 (via PR#517),
https://github.com/OpenChemistry/avogadrolibs/commit/68fb007e649a727c950dd3330a58f6fbd079f43f
debian/patches/export_molecule_save_68fb007.patch
applies that fix in avogadrolibs/1.93.1-3
[ Impact ]
If not fixed, users will think that avogadro2 is broken (which it is).
The user experience will be degraded.
[ Tests ]
Manually I have tested that the bug itself is fixed: avogadro2 now
exports molecules smoothly without jumping back to the Save dialog.
Automated debci tests are also passing.
[ Risks ]
The patch is a small 3-line change and is tested to work.
Hence risks are minimal.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
unblock avogadrolibs/1.93.1-3
diff -Nru avogadrolibs-1.93.1/debian/changelog avogadrolibs-1.93.1/debian/changelog
--- avogadrolibs-1.93.1/debian/changelog 2021-02-27 19:04:09.000000000 +0100
+++ avogadrolibs-1.93.1/debian/changelog 2021-04-14 22:48:26.000000000 +0200
@@ -1,3 +1,11 @@
+avogadrolibs (1.93.1-3) unstable; urgency=medium
+
+ * debian patch export_molecule_save_68fb007.patch applies upstream
+ commit 68fb007 (PR#517) to fix the Save dialog when exporting
+ molecules (upstream issue #439).
+
+ -- Drew Parsons <dparsons@debian.org> Wed, 14 Apr 2021 22:48:26 +0200
+
avogadrolibs (1.93.1-2) unstable; urgency=medium
* bring new upstream release into bullseye
diff -Nru avogadrolibs-1.93.1/debian/patches/export_molecule_save_68fb007.patch avogadrolibs-1.93.1/debian/patches/export_molecule_save_68fb007.patch
--- avogadrolibs-1.93.1/debian/patches/export_molecule_save_68fb007.patch 1970-01-01 01:00:00.000000000 +0100
+++ avogadrolibs-1.93.1/debian/patches/export_molecule_save_68fb007.patch 2021-04-14 22:48:26.000000000 +0200
@@ -0,0 +1,46 @@
+From 68fb007e649a727c950dd3330a58f6fbd079f43f Mon Sep 17 00:00:00 2001
+From: anubh4v <52047994+anubh4v@users.noreply.github.com>
+Date: Fri, 2 Apr 2021 21:18:25 +0530
+Subject: [PATCH] Fixes bug #439 (#517)
+
+* Fixes bug #439 - export molecule fails silently back to dialog
+
+The do while loop on line 123 was causing the issue.
+
+Signed-off-by: anubh4v <anubh4v@yandex.com>
+
+* Update fileformatdialog.cpp
+
+Signed-off-by: anubh4v <anubh4v@yandex.com>
+
+Co-authored-by: Geoff Hutchison <geoff.hutchison@gmail.com>
+---
+ avogadro/qtgui/fileformatdialog.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/avogadro/qtgui/fileformatdialog.cpp b/avogadro/qtgui/fileformatdialog.cpp
+index 47c2bd1b..805927da 100644
+--- a/avogadro/qtgui/fileformatdialog.cpp
++++ b/avogadro/qtgui/fileformatdialog.cpp
+@@ -90,9 +90,10 @@ FileFormatDialog::FormatFilePair FileFormatDialog::fileToWrite(
+ FormatFilePair result(nullptr, QString());
+ // Use the default read filter if none specified:
+ const QString realFilter = filter.isEmpty() ? writeFileFilter() : filter;
+-
++
++QString fileName;
+ do { // jump point for continue statements on retry
+- QString fileName =
++ fileName =
+ QFileDialog::getSaveFileName(parentWidget, caption, dir, realFilter);
+
+ if (fileName.isEmpty()) // user cancel
+@@ -120,7 +121,7 @@ FileFormatDialog::FormatFilePair FileFormatDialog::fileToWrite(
+ result.first = format;
+ result.second = fileName;
+
+- } while (true);
++ } while (fileName.isEmpty());
+
+ return result;
+ }
diff -Nru avogadrolibs-1.93.1/debian/patches/series avogadrolibs-1.93.1/debian/patches/series
--- avogadrolibs-1.93.1/debian/patches/series 2021-02-27 19:04:09.000000000 +0100
+++ avogadrolibs-1.93.1/debian/patches/series 2021-04-14 22:48:26.000000000 +0200
@@ -2,3 +2,4 @@
drop_cp2kinput.patch
script_hashbang.patch
patch_version_1.93.1.patch
+export_molecule_save_68fb007.patch
Reply to: