Skip to content

Commit

Permalink
Small stylistic change before release
Browse files Browse the repository at this point in the history
  • Loading branch information
TimVanMourik committed Jul 24, 2017
1 parent 850099e commit 8fefa5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions include/NodeTreeEditor/NodeTreeEditor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include <QScrollArea>
#include <QStandardItemModel>

#include "Hider.hpp"

class Node;
class NodeTreeItem;
class CodeEditor;
Expand Down
7 changes: 4 additions & 3 deletions include/NodeTreeEditor/NodeTreeItem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@

#include <QGraphicsPathItem>
#include <QPoint>
#include <QPushButton>
#include <QStandardItem>
#include <QFrame>
#include <QUrl>

class Node;
class NodeSetting;
Expand All @@ -39,9 +41,6 @@ class QLabel;
class QLineEdit;
class QVBoxLayout;

#include "Hider.hpp"

#include <QPushButton>
class NodeTreeItem : public QFrame
{
Q_OBJECT
Expand Down Expand Up @@ -114,6 +113,8 @@ public slots:
//
Node* m_node;
//
QUrl m_url;
//
QPoint m_startPosition;
//
QLabel* m_numberLabel;
Expand Down
Binary file modified resources/images/porcupine-walking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions src/NodeTreeEditor/NodeTreeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ NodeTreeItem::NodeTreeItem(
) :
QFrame(_parent),
m_node(_node),
m_url(m_node->getJson()["title"].toObject()["web_url"].toString()),
m_startPosition(QPoint()),
m_numberLabel(0),
m_number(0),
Expand Down Expand Up @@ -87,8 +88,7 @@ NodeTreeItem::NodeTreeItem(
headerLayout->addWidget(nameTag);
connect(&m_node->getAntenna(), SIGNAL(nodeNameChanged(QString)), nameTag, SLOT(setText(QString)));

QString urlString = m_node->getJson()["title"].toObject()["web_url"].toString();
if(!urlString.isEmpty())
if(!m_url.isEmpty())
{
QPushButton* urlButton = new QPushButton();
urlButton->setMaximumWidth(18);
Expand Down Expand Up @@ -172,9 +172,7 @@ void NodeTreeItem::saveToJson(
void NodeTreeItem::openLink(
)
{
QString urlString = m_node->getJson()["title"].toObject()["web_url"].toString();
QUrl url(urlString);
QDesktopServices::openUrl(url);
QDesktopServices::openUrl(m_url);
}

void NodeTreeItem::mousePressEvent(
Expand Down

0 comments on commit 8fefa5c

Please sign in to comment.