public void mouseClicked(MouseEvent event) {

            if (!numpadActive && !nodeEditActive && !isAlgoRunning() && ((chosenAlgo.equals(algoType.dijkstras) || currentGraph.advancedMode))) {
                for (GraphNode gnode : currentGraph.getNodes()) {
                    if (gnode.contains(event.getLocationOnScreen())) {
                        selectedNode = gnode;
                        showNodeOptions(); // as this will operate on the selected node, there is no need to pass it anything
                        inkLine = new Path2D.Double();
                        coordinates.clear();
                        repaint();
                        changesMade();
                        return;
                    }
                }
            }
            currentGraph.updateGraph(currentGraph.getNodes(), currentGraph.getEdges());
        }