1 |
commit: 99722c1e15796d7b5b60d59a43b1bc73f0657eea |
2 |
Author: Aritz Erkiaga <aerkiaga3 <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Sep 3 15:57:03 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 7 09:54:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99722c1e |
7 |
|
8 |
Backport critical fixes to sci-libs/avogadrolibs |
9 |
|
10 |
Signed-off-by: Aritz Erkiaga <aerkiaga3 <AT> gmail.com> |
11 |
Closes: https://bugs.gentoo.org/868132 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/27128 |
13 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
14 |
|
15 |
...1.95.1.ebuild => avogadrolibs-1.95.1-r1.ebuild} | 1 + |
16 |
.../avogadrolibs-1.95.1-usability_backport.patch | 81 ++++++++++++++++++++++ |
17 |
2 files changed, 82 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/avogadrolibs/avogadrolibs-1.95.1.ebuild b/sci-libs/avogadrolibs/avogadrolibs-1.95.1-r1.ebuild |
20 |
similarity index 97% |
21 |
rename from sci-libs/avogadrolibs/avogadrolibs-1.95.1.ebuild |
22 |
rename to sci-libs/avogadrolibs/avogadrolibs-1.95.1-r1.ebuild |
23 |
index 2a3a1c7cdb9b..ea0659f222d9 100644 |
24 |
--- a/sci-libs/avogadrolibs/avogadrolibs-1.95.1.ebuild |
25 |
+++ b/sci-libs/avogadrolibs/avogadrolibs-1.95.1-r1.ebuild |
26 |
@@ -47,6 +47,7 @@ BDEPEND=" |
27 |
PATCHES=( |
28 |
"${FILESDIR}/"${PN}-1.91.0_pre20180406-bundled-genxrdpattern.patch |
29 |
"${FILESDIR}/"${PN}-1.95.1-tests.patch |
30 |
+ "${FILESDIR}/"${PN}-1.95.1-usability_backport.patch |
31 |
) |
32 |
|
33 |
src_unpack() { |
34 |
|
35 |
diff --git a/sci-libs/avogadrolibs/files/avogadrolibs-1.95.1-usability_backport.patch b/sci-libs/avogadrolibs/files/avogadrolibs-1.95.1-usability_backport.patch |
36 |
new file mode 100644 |
37 |
index 000000000000..07a32023600e |
38 |
--- /dev/null |
39 |
+++ b/sci-libs/avogadrolibs/files/avogadrolibs-1.95.1-usability_backport.patch |
40 |
@@ -0,0 +1,81 @@ |
41 |
+From 56c67fff7dd7ec84b2f2b5c2e5beaec13981e408 Mon Sep 17 00:00:00 2001 |
42 |
+From: Aritz Erkiaga <aerkiaga3@×××××.com> |
43 |
+Date: Sat, 3 Sep 2022 16:54:55 +0200 |
44 |
+Subject: [PATCH 1/3] Fix erratic editing behavior |
45 |
+ |
46 |
+Signed-off-by: Aritz Erkiaga <aerkiaga3@×××××.com> |
47 |
+--- |
48 |
+ avogadro/qtgui/rwmolecule_undo.h | 2 +- |
49 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
50 |
+ |
51 |
+diff --git a/avogadro/qtgui/rwmolecule_undo.h b/avogadro/qtgui/rwmolecule_undo.h |
52 |
+index de5bdd33..20768066 100644 |
53 |
+--- a/avogadro/qtgui/rwmolecule_undo.h |
54 |
++++ b/avogadro/qtgui/rwmolecule_undo.h |
55 |
+@@ -89,7 +89,7 @@ public: |
56 |
+ { |
57 |
+ assert(m_molecule.atomCount() == m_atomId); |
58 |
+ if (m_usingPositions) |
59 |
+- m_molecule.addAtom(m_atomicNumber, Vector3::Zero(), m_atomId); |
60 |
++ m_molecule.addAtom(m_atomicNumber, Vector3::Zero(), m_atomUid); |
61 |
+ else |
62 |
+ m_molecule.addAtom(m_atomicNumber, m_atomUid); |
63 |
+ m_molecule.layer().addAtom(m_layer, m_atomId); |
64 |
+-- |
65 |
+2.34.1 |
66 |
+ |
67 |
+ |
68 |
+From 5159ea1a9629ad82130670767cc25c5065f9627c Mon Sep 17 00:00:00 2001 |
69 |
+From: Aritz Erkiaga <aerkiaga3@×××××.com> |
70 |
+Date: Sat, 3 Sep 2022 16:55:26 +0200 |
71 |
+Subject: [PATCH 2/3] Fix Manipulator Tool not working at all |
72 |
+ |
73 |
+Signed-off-by: Aritz Erkiaga <aerkiaga3@×××××.com> |
74 |
+--- |
75 |
+ avogadro/qtplugins/manipulator/manipulator.cpp | 2 +- |
76 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
77 |
+ |
78 |
+diff --git a/avogadro/qtplugins/manipulator/manipulator.cpp b/avogadro/qtplugins/manipulator/manipulator.cpp |
79 |
+index 19dc51ac..29559dd0 100644 |
80 |
+--- a/avogadro/qtplugins/manipulator/manipulator.cpp |
81 |
++++ b/avogadro/qtplugins/manipulator/manipulator.cpp |
82 |
+@@ -129,7 +129,7 @@ QUndoCommand* Manipulator::mouseMoveEvent(QMouseEvent* e) |
83 |
+ Vector2f windowPos(e->localPos().x(), e->localPos().y()); |
84 |
+ |
85 |
+ if (mol->isSelectionEmpty() && m_object.type == Rendering::AtomType && |
86 |
+- m_object.molecule == mol) { |
87 |
++ m_object.molecule == &m_molecule->molecule()) { |
88 |
+ // translate single atom position |
89 |
+ RWAtom atom = m_molecule->atom(m_object.index); |
90 |
+ Vector3f oldPos(atom.position3d().cast<float>()); |
91 |
+-- |
92 |
+2.34.1 |
93 |
+ |
94 |
+ |
95 |
+From f38bfbc88f0722a66ab298ff26073874b5f73634 Mon Sep 17 00:00:00 2001 |
96 |
+From: Aritz Erkiaga <aerkiaga3@×××××.com> |
97 |
+Date: Sat, 3 Sep 2022 16:55:59 +0200 |
98 |
+Subject: [PATCH 3/3] Fix Bond Centric Tool not working at all |
99 |
+ |
100 |
+Signed-off-by: Aritz Erkiaga <aerkiaga3@×××××.com> |
101 |
+--- |
102 |
+ avogadro/qtplugins/bondcentrictool/bondcentrictool.cpp | 3 +-- |
103 |
+ 1 file changed, 1 insertion(+), 2 deletions(-) |
104 |
+ |
105 |
+diff --git a/avogadro/qtplugins/bondcentrictool/bondcentrictool.cpp b/avogadro/qtplugins/bondcentrictool/bondcentrictool.cpp |
106 |
+index 79112899..3a853057 100644 |
107 |
+--- a/avogadro/qtplugins/bondcentrictool/bondcentrictool.cpp |
108 |
++++ b/avogadro/qtplugins/bondcentrictool/bondcentrictool.cpp |
109 |
+@@ -342,8 +342,7 @@ QUndoCommand* BondCentricTool::mousePressEvent(QMouseEvent* e) |
110 |
+ Rendering::Identifier ident = m_renderer->hit(e->pos().x(), e->pos().y()); |
111 |
+ |
112 |
+ // If no hits, return. Also ensure that the hit molecule is the one we expect. |
113 |
+- const Core::Molecule* mol = &m_molecule->molecule(); |
114 |
+- if (!ident.isValid() || ident.molecule != mol) |
115 |
++ if (!ident.isValid() || ident.molecule != &m_molecule->molecule()) |
116 |
+ return nullptr; |
117 |
+ |
118 |
+ // If the hit is a left click on a bond, make it the selected bond and map |
119 |
+-- |
120 |
+2.34.1 |
121 |
+ |