Skip to content

Commit

Permalink
2.0 Official Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Harinlen committed Jun 7, 2015
1 parent 38ce067 commit 7af2ca2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion enemyaddwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ EnemyAddWidget::EnemyAddWidget(QWidget *parent) :
m_cancel(new QPushButton(this))
{
//Intial labels.
for(int i=0; i<3; i++)
for(int i=0; i<2; i++)
{
m_labels[i]=new QLabel(this);
}

m_xData=new QLineEdit(this);
m_yData=new QLineEdit(this);

Expand Down
2 changes: 1 addition & 1 deletion enemyaddwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private slots:
private:
QGroupBox *m_editArea;
QPushButton *m_okay, *m_cancel;
QLabel *m_labels[2];
QLabel *m_labels[3];
QLineEdit *m_xData, *m_yData;
};

Expand Down
9 changes: 9 additions & 0 deletions ground.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,17 @@ void Ground::onActionNew()
//Get the new data.
if(QDialog::Accepted==m_generator->exec())
{
//Set the border and barracks.
setBorder(m_generator->border());
setBarracks(m_generator->barracks());
//Set changed flag.
m_changed=true;
//Update the image.
update();
//Enabled save and save as actions.
m_actions[Save]->setEnabled(true);
m_actions[SaveAs]->setEnabled(true);
m_actions[Close]->setEnabled(true);
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions groundpreviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ bool GroundPreviewer::showPreviewPoint() const
void GroundPreviewer::setPreviewBorder(const QPolygonF &groundBorder)
{
//Update the ground height and width.
onActionGroundSizeChanged(
QSize(groundBorder.boundingRect().right()+
(RobotBase::robotSize()<<1),
groundBorder.boundingRect().bottom()+
(RobotBase::robotSize()<<1)));
//Gernerate the preview border, will zoom the original ground.
QPolygonF previewGroundBorder;
for(QPointF borderPoint : groundBorder)
Expand Down

0 comments on commit 7af2ca2

Please sign in to comment.