Commit 92540851 authored by Florent D'Halluin's avatar Florent D'Halluin
Browse files

[yavgui] Set ZValue upon (de)selection.

* yavgui/src/g_state.cc,
* yavgui/src/g_transition.cc: Do that.
parent ab19754d
2009-08-09 d-halluin <d-halluin@lrde.epita.fr>
[yavgui] Set ZValue upon (de)selection.
* yavgui/src/g_state.cc,
* yavgui/src/g_transition.cc: Do that.
2009-08-09 d-halluin <d-halluin@lrde.epita.fr>
 
[yavgui] Ask for alphabet during automaton creation.
......
......@@ -235,7 +235,6 @@ namespace gui
}
if (event->button () == Qt::RightButton)
{
setZValue(1);
drawing_transition_ = true;
mouse_pos_ = event->pos();
update_bounding_rect_();
......@@ -251,7 +250,6 @@ namespace gui
if (drawing_transition_)
{
drawing_transition_ = false;
setZValue(0);
GState* s = dynamic_cast<GState*>(scene()->itemAt(event->scenePos()));
if (s && s != this)
{
......@@ -321,7 +319,7 @@ namespace gui
if (selected_)
return;
color_ = highlight_color_;
setZValue(1);
selected_ = true;
update ();
emit selected ();
......@@ -333,7 +331,7 @@ namespace gui
if (!selected_)
return;
color_ = default_color_;
setZValue(0);
selected_ = false;
update ();
emit deselected ();
......
......@@ -404,8 +404,10 @@ namespace gui
void
GTransition::select ()
{
if (selected_)
return;
color_ = highlight_color_;
setZValue(1);
selected_ = true;
update ();
emit selected ();
......@@ -414,8 +416,10 @@ namespace gui
void
GTransition::deselect ()
{
if (!selected_)
return;
color_ = default_color_;
setZValue(0);
selected_ = false;
update ();
emit deselected ();
......
Supports Markdown
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