Commit 45bf6ecd authored by Denis Khachko's avatar Denis Khachko

Robot

parent ea73b9fb
...@@ -766,6 +766,8 @@ namespace ActorRobot { ...@@ -766,6 +766,8 @@ namespace ActorRobot {
QGraphicsView * view=views().first(); QGraphicsView * view=views().first();
if(mode==NORMAL_MODE) if(mode==NORMAL_MODE)
{ {
if(this->items().indexOf(keyCursor)>-1)this->removeItem(keyCursor);
radSpinBox->hide(); radSpinBox->hide();
tempSpinBox->hide(); tempSpinBox->hide();
redrawEditFields(); redrawEditFields();
...@@ -773,6 +775,7 @@ namespace ActorRobot { ...@@ -773,6 +775,7 @@ namespace ActorRobot {
} }
if(mode==NEDIT_MODE) if(mode==NEDIT_MODE)
{ {
if(this->items().indexOf(keyCursor)>-1)this->removeItem(keyCursor);
radSpinBox->hide(); radSpinBox->hide();
tempSpinBox->hide(); tempSpinBox->hide();
redrawEditFields(); redrawEditFields();
...@@ -781,6 +784,8 @@ namespace ActorRobot { ...@@ -781,6 +784,8 @@ namespace ActorRobot {
if(mode==RAD_MODE) if(mode==RAD_MODE)
{ {
if(this->items().indexOf(keyCursor)>-1)this->removeItem(keyCursor);
tempSpinBox->hide(); tempSpinBox->hide();
radSpinBox->setParent(view); radSpinBox->setParent(view);
radSpinBox->move(100,2); radSpinBox->move(100,2);
...@@ -796,6 +801,8 @@ namespace ActorRobot { ...@@ -796,6 +801,8 @@ namespace ActorRobot {
} }
if(mode==TEMP_MODE) if(mode==TEMP_MODE)
{ {
if(this->items().indexOf(keyCursor)>-1)this->removeItem(keyCursor);
radSpinBox->hide(); radSpinBox->hide();
tempSpinBox->setParent(view); tempSpinBox->setParent(view);
tempSpinBox->move(100,2); tempSpinBox->move(100,2);
...@@ -2479,7 +2486,7 @@ namespace ActorRobot { ...@@ -2479,7 +2486,7 @@ namespace ActorRobot {
{ {
timer->start(500); timer->start(500);
if(this->items().indexOf(keyCursor)>-1)this->removeItem(keyCursor);
keyCursor=new QGraphicsLineItem(upLeftCorner(row,col).x()+4,upLeftCorner(row,col).y()+18,upLeftCorner(row,col).x()+4,upLeftCorner(row,col).y()+29); keyCursor=new QGraphicsLineItem(upLeftCorner(row,col).x()+4,upLeftCorner(row,col).y()+18,upLeftCorner(row,col).x()+4,upLeftCorner(row,col).y()+29);
...@@ -2489,7 +2496,7 @@ namespace ActorRobot { ...@@ -2489,7 +2496,7 @@ namespace ActorRobot {
}; };
void RoboField::timerTic() void RoboField::timerTic()
{ {
if(!EDIT_MODE){ if(mode!=TEXT_MODE){
keyCursor->hide(); keyCursor->hide();
timer->stop(); timer->stop();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment