void updateStatus() {
		a_undo.setEnabled(m_BayesNet.canUndo());
		a_redo.setEnabled(m_BayesNet.canRedo());

		a_datagenerator.setEnabled(m_BayesNet.getNrOfNodes() > 0);

		if (!m_bViewMargins && !m_bViewCliques) {
			repaint();
			return;
		}

		try {
			m_marginCalculator = new MarginCalculator();
			m_marginCalculator.calcMargins(m_BayesNet);
			SerializedObject so = new SerializedObject(m_marginCalculator);
			m_marginCalculatorWithEvidence = (MarginCalculator) so.getObject();
			for (int iNode = 0; iNode < m_BayesNet.getNrOfNodes(); iNode++) {
				if (m_BayesNet.getEvidence(iNode) >= 0) {
					m_marginCalculatorWithEvidence.setEvidence(iNode, m_BayesNet.getEvidence(iNode));
				}
			}
			for (int iNode = 0; iNode < m_BayesNet.getNrOfNodes(); iNode++) {
				m_BayesNet.setMargin(iNode, m_marginCalculatorWithEvidence.getMargin(iNode));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		repaint();
	}