Skip to content

Commit

Permalink
Restore changes from old branch
Browse files Browse the repository at this point in the history
  • Loading branch information
markummitchell-tu committed Jul 8, 2019
1 parent 3af6e3e commit df079c9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 30 deletions.
22 changes: 8 additions & 14 deletions contrib/python/ParseDig.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,12 @@ def callEngauge (argumentsArray, debug = False):
debugArgs = ['-debug']
fullArgs = [engaugeExecutable] + debugArgs + argumentsArray

useShell = False
if useShell:
# Linux has a bug where using shell requires arguments to be joined or else only first is seen
p = subprocess.Popen (' '.join (fullArgs),
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE,
shell = True)
else:
p = subprocess.Popen (fullArgs,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
# Linux has a bug where using shell requires arguments to be joined or else only first is seen. So if shell=True
# is added then first argument becomes ' '.join (fullArgs)
p = subprocess.Popen (fullArgs,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
out, err = p.communicate ()
preturncode = p.returncode
if preturncode == -SIGSEGV:
Expand Down Expand Up @@ -246,7 +239,8 @@ def parseXml(self, tree):
self.LogPlot = True
#sys.exit (1)
elif (node.tag == 'Export'):
delimiterEnum = node.attrib.get('Delimiter')
# delimiterEnum = node.attrib.get('Delimiter')
pass
elif (node.tag == 'Curve'):
curveName = node.attrib.get('CurveName')
if (curveName == 'Axes'):
Expand Down
12 changes: 6 additions & 6 deletions src/Dlg/DlgEditPointAxis.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
#define DLG_EDIT_POINT_AXIS_H

#include "DocumentAxesPointsRequired.h"
#include "DocumentModelCoords.h"
#include "DocumentModelGeneral.h"
#include "MainWindowModel.h"
#include <QDialog>
#include <QLineEdit>
#include <QPushButton>

class DlgValidatorAbstract;
class DocumentModelCoords;
class DocumentModelGeneral;
class MainWindow;
class MainWindowModel;
class QVBoxLayout;
class Transformation;

Expand Down Expand Up @@ -70,9 +70,9 @@ private slots:

DocumentAxesPointsRequired m_documentAxesPointsRequired;

const DocumentModelCoords &m_modelCoords;
const DocumentModelGeneral &m_modelGeneral;
const MainWindowModel &m_modelMainWindow;
const DocumentModelCoords m_modelCoords;
const DocumentModelGeneral m_modelGeneral;
const MainWindowModel m_modelMainWindow;
};

#endif // DLG_EDIT_POINT_AXIS_H
12 changes: 6 additions & 6 deletions src/Dlg/DlgEditPointGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#ifndef DLG_EDIT_POINT_GRAPH_H
#define DLG_EDIT_POINT_GRAPH_H

#include "DocumentModelCoords.h"
#include "DocumentModelGeneral.h"
#include "MainWindowModel.h"
#include <QDialog>
#include <QPointF>
#include <QString>

class DlgEditPointGraphLineEdit;
class DlgValidatorAbstract;
class DocumentModelCoords;
class DocumentModelGeneral;
class MainWindow;
class MainWindowModel;
class QPushButton;
class QVBoxLayout;
class Transformation;
Expand Down Expand Up @@ -69,9 +69,9 @@ private slots:
// Enable Ok button once text has changed. For simplicity, this is true even when original text is restored
bool m_changed;

const DocumentModelCoords &m_modelCoords;
const DocumentModelGeneral &m_modelGeneral;
const MainWindowModel &m_modelMainWindow;
const DocumentModelCoords m_modelCoords;
const DocumentModelGeneral m_modelGeneral;
const MainWindowModel m_modelMainWindow;
};

#endif // DLG_EDIT_POINT_GRAPH_H
7 changes: 6 additions & 1 deletion src/Point/PointStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ const PointShape DEFAULT_POINT_SHAPE_AXIS = POINT_SHAPE_CROSS;
const double PI = 3.1415926535;
const double TWO_PI = 2.0 * PI;

PointStyle::PointStyle ()
PointStyle::PointStyle () :
// Defaults that prevent address sanitizer warnings. Overwritten immediately
m_shape (DEFAULT_POINT_SHAPE_AXIS),
m_radius (DEFAULT_POINT_RADIUS),
m_lineWidth (DEFAULT_POINT_LINE_WIDTH),
m_paletteColor (DEFAULT_POINT_COLOR_GRAPH)
{
}

Expand Down
8 changes: 5 additions & 3 deletions src/Tutorial/TutorialButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ TutorialButton::TutorialButton (const QString &text,

TutorialButton::~TutorialButton ()
{
QGraphicsScene *scene = m_rect->scene();
scene->removeItem (m_rect); // This also removes m_text from the scene
if (m_rect != nullptr) {
QGraphicsScene *scene = m_rect->scene();
scene->removeItem (m_rect); // This also removes m_text from the scene

delete m_rect;
delete m_rect;
}
delete m_text;
}

Expand Down
1 change: 1 addition & 0 deletions src/main/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ MainWindow::MainWindow(const QString &errorReportFile,
const QStringList &commandLineWithoutLoadStartupFiles,
QWidget *parent) :
QMainWindow(parent),
m_originalFileWasImported (false),
m_isDocumentExported (false),
m_engaugeFile (EMPTY_FILENAME),
m_currentFile (EMPTY_FILENAME),
Expand Down

0 comments on commit df079c9

Please sign in to comment.