caneda: fix build with gcc6
This commit is contained in:
parent
86e6e8016d
commit
04b8a85739
@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ cmake qt4 libxml2 libxslt ];
|
buildInputs = [ cmake qt4 libxml2 libxslt ];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./gcc6.patch
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir $out/share/caneda/components
|
mkdir $out/share/caneda/components
|
||||||
cp -R ${srcComponents}/* $out/share/caneda/components
|
cp -R ${srcComponents}/* $out/share/caneda/components
|
||||||
|
13
pkgs/applications/science/electronics/caneda/gcc6.patch
Normal file
13
pkgs/applications/science/electronics/caneda/gcc6.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git c/src/cgraphicsscene.cpp i/src/cgraphicsscene.cpp
|
||||||
|
index ac2929a..c399706 100644
|
||||||
|
--- c/src/cgraphicsscene.cpp
|
||||||
|
+++ i/src/cgraphicsscene.cpp
|
||||||
|
@@ -1436,7 +1436,7 @@ namespace Caneda
|
||||||
|
QPointF newPos = m_currentWiringWire->mapFromScene(pos);
|
||||||
|
QPointF refPos = m_currentWiringWire->port1()->pos();
|
||||||
|
|
||||||
|
- if( abs(refPos.x()-newPos.x()) > abs(refPos.y()-newPos.y()) ) {
|
||||||
|
+ if( (refPos.x()-newPos.x()) > (refPos.y()-newPos.y()) ) {
|
||||||
|
m_currentWiringWire->movePort2(QPointF(newPos.x(), refPos.y()));
|
||||||
|
}
|
||||||
|
else {
|
Loading…
Reference in New Issue
Block a user