Remove magic number and hard type enums in DrawBrokenView.h
- Remove currently present magic numbers - Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
This commit is contained in:
committed by
WandererFan
parent
79fdfb2cad
commit
e2446c4076
@@ -71,21 +71,21 @@ QGIBreakLine::QGIBreakLine()
|
||||
|
||||
void QGIBreakLine::draw()
|
||||
{
|
||||
if (breakType() == 0) {
|
||||
if (breakType() == DrawBrokenView::BreakType::NONE) {
|
||||
// none
|
||||
m_background->hide();
|
||||
m_line0->hide();
|
||||
m_line1->hide();
|
||||
}
|
||||
|
||||
if (breakType() == 1) {
|
||||
if (breakType() == DrawBrokenView::BreakType::ZIGZAG) {
|
||||
drawLargeZigZag();
|
||||
m_background->show();
|
||||
m_line0->show();
|
||||
m_line1->show();
|
||||
}
|
||||
|
||||
if (breakType() == 2) {
|
||||
if (breakType() == DrawBrokenView::BreakType::SIMPLE) {
|
||||
// simple line from pref
|
||||
drawSimpleLines();
|
||||
m_background->hide();
|
||||
|
||||
Reference in New Issue
Block a user