Handle all tools when creating the history records.
--HG-- branch : develop
This commit is contained in:
parent
6b4b79a1b5
commit
61adfbaef5
|
@ -193,6 +193,11 @@ void DialogHistory::FillTable()
|
||||||
ui->tableWidget->verticalHeader()->setDefaultSectionSize(20);
|
ui->tableWidget->verticalHeader()->setDefaultSectionSize(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(Q_CC_GNU)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wswitch-default"
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief Record return description for record
|
* @brief Record return description for record
|
||||||
|
@ -212,6 +217,12 @@ QString DialogHistory::Record(const VToolRecord &tool)
|
||||||
switch ( tool.getTypeTool() )
|
switch ( tool.getTypeTool() )
|
||||||
{
|
{
|
||||||
case Tool::Arrow:
|
case Tool::Arrow:
|
||||||
|
case Tool::SinglePoint:
|
||||||
|
case Tool::DoublePoint:
|
||||||
|
case Tool::LinePoint:
|
||||||
|
case Tool::AbstractSpline:
|
||||||
|
case Tool::Cut:
|
||||||
|
case Tool::LAST_ONE_DO_NOT_USE:
|
||||||
Q_UNREACHABLE(); //-V501
|
Q_UNREACHABLE(); //-V501
|
||||||
break;
|
break;
|
||||||
case Tool::BasePoint:
|
case Tool::BasePoint:
|
||||||
|
@ -400,6 +411,10 @@ QString DialogHistory::Record(const VToolRecord &tool)
|
||||||
{
|
{
|
||||||
return QString(tr("%1 - point of circles intersection")).arg(PointName(tool.getId()));
|
return QString(tr("%1 - point of circles intersection")).arg(PointName(tool.getId()));
|
||||||
}
|
}
|
||||||
|
case Tool::PointOfIntersectionCurves:
|
||||||
|
{
|
||||||
|
return QString(tr("%1 - point of curves intersection")).arg(PointName(tool.getId()));
|
||||||
|
}
|
||||||
case Tool::PointFromCircleAndTangent:
|
case Tool::PointFromCircleAndTangent:
|
||||||
{
|
{
|
||||||
return QString(tr("%1 - point from circle and tangent")).arg(PointName(tool.getId()));
|
return QString(tr("%1 - point from circle and tangent")).arg(PointName(tool.getId()));
|
||||||
|
@ -429,10 +444,6 @@ QString DialogHistory::Record(const VToolRecord &tool)
|
||||||
break;
|
break;
|
||||||
case Tool::NodeSplinePath:
|
case Tool::NodeSplinePath:
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
qDebug()<<"Got wrong tool type. Ignore.";
|
|
||||||
return tr("Can't create record.");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const VExceptionBadId &e)
|
catch (const VExceptionBadId &e)
|
||||||
|
@ -440,9 +451,14 @@ QString DialogHistory::Record(const VToolRecord &tool)
|
||||||
qDebug()<<e.ErrorMessage()<<Q_FUNC_INFO;
|
qDebug()<<e.ErrorMessage()<<Q_FUNC_INFO;
|
||||||
return tr("Can't create record.");
|
return tr("Can't create record.");
|
||||||
}
|
}
|
||||||
return QString();
|
qDebug()<<"Can't create history record for the tool.";
|
||||||
|
return tr("Can't create record.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(Q_CC_GNU)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief InitialTable set initial option of table
|
* @brief InitialTable set initial option of table
|
||||||
|
|
|
@ -97,7 +97,7 @@ enum class Tool : ToolVisHolderType
|
||||||
PointFromCircleAndTangent,
|
PointFromCircleAndTangent,
|
||||||
PointFromArcAndTangent,
|
PointFromArcAndTangent,
|
||||||
TrueDarts,
|
TrueDarts,
|
||||||
UnionDetails, // 37
|
UnionDetails,
|
||||||
LAST_ONE_DO_NOT_USE //add new stuffs above this, this constant must be last and never used
|
LAST_ONE_DO_NOT_USE //add new stuffs above this, this constant must be last and never used
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user