1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

caneda: fix build with gcc6

This commit is contained in:
Samuel Leathers 2017-08-31 22:59:37 -04:00
parent 86e6e8016d
commit 04b8a85739
2 changed files with 17 additions and 0 deletions

View file

@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake qt4 libxml2 libxslt ];
patches = [
./gcc6.patch
];
postInstall = ''
mkdir $out/share/caneda/components
cp -R ${srcComponents}/* $out/share/caneda/components

View 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 {