|
@@ -1105,6 +1105,12 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLE->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
mpLERoadType = pLE;
|
|
|
|
|
|
+ mpCBStraightType = new QCheckBox(pGroup);
|
|
|
+ mpCBStraightType->setText("Line Only");
|
|
|
+ mpCBStraightType->setChecked(false);
|
|
|
+ mpCBStraightType->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
+ mpCBStraightType->setVisible(false);
|
|
|
+
|
|
|
mpCBRoadType->setCurrentIndex(0);
|
|
|
mpLBRoadType->setVisible(true);
|
|
|
mpLERoadType->setVisible(true);
|
|
@@ -3474,7 +3480,7 @@ void MainWindow::onClickCreateRoad()
|
|
|
case 1:
|
|
|
{
|
|
|
double fdis = sqrt(pow(startx - endx,2) +pow(starty -endy,2));
|
|
|
- if((fdis<10) || (starthdg == endhdg))
|
|
|
+ if((fdis<10) || (starthdg == endhdg) ||(mpCBStraightType->isChecked()))
|
|
|
{
|
|
|
xvectorgeo = CreateLineGeo(startx,starty,starthdg,endx,endy,endhdg);
|
|
|
}
|
|
@@ -3961,13 +3967,15 @@ void MainWindow::onChangeRoadType(int index)
|
|
|
{
|
|
|
if(index == 1)
|
|
|
{
|
|
|
- mpLBRoadType->setVisible(false);
|
|
|
+ mpLBRoadType->setVisible(true);
|
|
|
mpLERoadType->setVisible(false);
|
|
|
+ mpCBStraightType->setVisible(true);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
mpLBRoadType->setVisible(true);
|
|
|
mpLERoadType->setVisible(true);
|
|
|
+ mpCBStraightType->setVisible(false);
|
|
|
}
|
|
|
|
|
|
if(index == 0)
|
|
@@ -3976,6 +3984,11 @@ void MainWindow::onChangeRoadType(int index)
|
|
|
mpLERoadType->setText("6.0");
|
|
|
}
|
|
|
|
|
|
+ if(index == 1)
|
|
|
+ {
|
|
|
+ mpLBRoadType->setText("Type:");
|
|
|
+ }
|
|
|
+
|
|
|
if(index == 2)
|
|
|
{
|
|
|
mpLBRoadType->setText("Extend:");
|