Skip to content

Commit

Permalink
Merge pull request GLVis#84 from GLVis/f7-fix
Browse files Browse the repository at this point in the history
Fixed support for the 'F7' key
  • Loading branch information
tzanio authored Mar 21, 2019
2 parents 2e9aa75 + a6e64e7 commit 20aeb2c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/vsdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,18 +879,7 @@ void KeyF6Pressed()

void KeyF7Pressed(GLenum state)
{
if (state == 0)
{
cout << "[minv,maxv] = [" << vsdata->GetMinV() << "," << vsdata->GetMaxV()
<< "] maxv-minv = " << vsdata->GetMaxV()-vsdata->GetMinV() << "\n"
<< "New value for minv: " << flush;
cin >> vsdata->GetMinV();
cout << "New value for maxv: " << flush;
cin >> vsdata->GetMaxV();
vsdata->UpdateValueRange(true);
SendExposeEvent();
}
else if (state & ShiftMask)
if (state & ShiftMask)
{
cout << "Current bounding box:\n"
<< " min: (" << vsdata->x[0] << ',' << vsdata->y[0] << ','
Expand Down Expand Up @@ -918,6 +907,17 @@ void KeyF7Pressed(GLenum state)
vsdata->UpdateBoundingBox();
SendExposeEvent();
}
else
{
cout << "[minv,maxv] = [" << vsdata->GetMinV() << "," << vsdata->GetMaxV()
<< "] maxv-minv = " << vsdata->GetMaxV()-vsdata->GetMinV() << "\n"
<< "New value for minv: " << flush;
cin >> vsdata->GetMinV();
cout << "New value for maxv: " << flush;
cin >> vsdata->GetMaxV();
vsdata->UpdateValueRange(true);
SendExposeEvent();
}
}

void KeyBackslashPressed()
Expand Down

0 comments on commit 20aeb2c

Please sign in to comment.