Commit 0cf6e326 authored by Janet Barrett's avatar Janet Barrett
Browse files

Fixed qview crash problem when 2D spatial profile is used without defining a...

Fixed qview crash problem when 2D spatial profile is used without defining a profile. Fixes #1921 and #1950.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5913 41f8697f-d340-4b68-9986-7bafba869bb8
parent 2c8974b4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -361,6 +361,7 @@ namespace Isis {
          }
        }

        if (lineLength > 0) {
          for(int index = 0; index <= lineLength; index++) {
            // % across * delta x + initial = x position of point (sample)
            double sample = (index / (double)lineLength) * (endSample - startSample) +
@@ -405,6 +406,12 @@ namespace Isis {
            }
          }
        }
        else {
          QMessageBox::information(NULL, "Error",
                                   "The selected Area contains no valid pixels",
                                   QMessageBox::Ok);
        }
      }
      else if (rubberBandTool()->currentMode() == RubberBandTool::RotatedRectangleMode) {
        /*
         * We have a rotated rectangle:
+4 −0
Original line number Diff line number Diff line
@@ -48,6 +48,10 @@ namespace Isis {
   *   @history 2014-04-15 Tracie Sucharski - Reset defaults for plots to the following:
   *                         SolidLine, Width=1, NoSymbols.  This is a temporary fix until
   *                         the defaults can be saved on a user basis.  Fixes #2062.
   *   @history 2014-06-20 Janet Barrett - Fixed SpatialPlotTool::getSpatialStatistics to
   *                         check for length of line used to draw profile to make sure it
   *                         is greater than zero to avoid divide by zero error. Fixes #1921
   *                         and #1950.
   */
  class SpatialPlotTool : public AbstractPlotTool {
      Q_OBJECT