Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
nyalldawson committed Jul 24, 2017
1 parent 78b05c1 commit 7e749a5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
Empty file modified src/core/qgsunittypes.cpp 100755 → 100644
Empty file.
3 changes: 3 additions & 0 deletions src/gui/qgssymbolbutton.cpp
Expand Up @@ -69,6 +69,9 @@ void QgsSymbolButton::setSymbolType( QgsSymbol::SymbolType type )
case QgsSymbol::Fill:
mSymbol.reset( QgsFillSymbol::createSimple( QgsStringMap() ) );
break;

case QgsSymbol::Hybrid:
break;
}
}
updatePreview();
Expand Down
Empty file modified src/gui/qgsunitselectionwidget.cpp 100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgssymbolbutton.py
Expand Up @@ -39,7 +39,7 @@ def testGettersSetters(self):
button.setSymbolType(QgsSymbol.Line)
self.assertEqual(button.symbolType(), QgsSymbol.Line)

def testSettingSymbolType(self)
def testSettingSymbolType(self):
button = QgsSymbolButton()
button.setSymbolType(QgsSymbol.Marker)
symbol = QgsMarkerSymbol.createSimple({})
Expand Down Expand Up @@ -74,7 +74,7 @@ def testPasteSymbol(self):
# try pasting incompatible symbol
button2.setSymbolType(QgsSymbol.Fill)
fill_symbol = QgsFillSymbol.createSimple({})
fill_symbol.setColor(QColor(0,0,255))
fill_symbol.setColor(QColor(0, 0, 255))
button2.setSymbol(fill_symbol)
button.copySymbol() # copied a marker symbol
button2.pasteSymbol() # should have no effect
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_qgssymbollayerutils.py
Expand Up @@ -15,6 +15,7 @@
import qgis # NOQA

from qgis.core import QgsSymbolLayerUtils, QgsMarkerSymbol
from qgis.PyQt.QtGui import QColor
from qgis.PyQt.QtCore import QSizeF, QPointF
from qgis.testing import unittest

Expand Down

0 comments on commit 7e749a5

Please sign in to comment.