#include "formeditornodeinstanceview.h"
#include "formeditoritem.h"
#include "formeditorscene.h"
+#include "toolbox.h"
#include <rewritertransaction.h>
#include <modelnode.h>
#include <itemlibraryinfo.h>
// m_currentTool->formEditorItemsChanged(itemList);
}
+Utils::CrumblePath *FormEditorView::crumblePath() const
+{
+ if (widget() && widget()->toolBox()) {
+ return widget()->toolBox()->crumblePath();
+ }
+ return 0;
+}
+
void FormEditorView::reset()
{
QTimer::singleShot(200, this, SLOT(delayedReset()));
{
DesignDocumentControllerPrivate::clearCrumblePath = false;
DesignDocumentControllerPrivate::pushCrumblePath = false;
- while (!compareCrumbleBarInfo(d->formEditorView->widget()->toolBox()->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>(), crumbleBarInfo))
- d->formEditorView->widget()->toolBox()->crumblePath()->popElement();
+ while (!compareCrumbleBarInfo(d->formEditorView->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>(), crumbleBarInfo))
+ d->formEditorView->crumblePath()->popElement();
Core::EditorManager::instance()->openEditor(crumbleBarInfo.fileName);
DesignDocumentControllerPrivate::pushCrumblePath = true;
Internal::DesignModeWidget::instance()->currentDesignDocumentController()->changeToSubComponent(crumbleBarInfo.modelNode);
if (Internal::DesignModeWidget::instance()->currentDesignDocumentController() != this)
return;
DesignDocumentControllerPrivate::clearCrumblePath = false;
- while (!d->formEditorView->widget()->toolBox()->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>().modelNode.isRootNode())
- d->formEditorView->widget()->toolBox()->crumblePath()->popElement();
+ while (!d->formEditorView->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>().modelNode.isRootNode())
+ d->formEditorView->crumblePath()->popElement();
if (node.isRootNode())
- d->formEditorView->widget()->toolBox()->crumblePath()->popElement();
+ d->formEditorView->crumblePath()->popElement();
changeToSubComponent(node);
DesignDocumentControllerPrivate::clearCrumblePath = true;
}
if (DesignDocumentControllerPrivate::clearCrumblePath)
- d->formEditorView->widget()->toolBox()->crumblePath()->clear();
+ d->formEditorView->crumblePath()->clear();
if (DesignDocumentControllerPrivate::pushCrumblePath &&
- !compareCrumbleBarInfo(d->formEditorView->widget()->toolBox()->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>(),
+ !compareCrumbleBarInfo(d->formEditorView->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>(),
createCrumbleBarInfo().value<CrumbleBarInfo>()))
- d->formEditorView->widget()->toolBox()->crumblePath()->pushElement(simplfiedDisplayName(), createCrumbleBarInfo());
+ d->formEditorView->crumblePath()->pushElement(simplfiedDisplayName(), createCrumbleBarInfo());
d->documentLoaded = true;
Q_ASSERT(d->masterModel);
m_statesEditorView = new StatesEditorView(this);
m_formEditorView = new FormEditorView(this);
- connect(m_formEditorView->widget()->toolBox()->crumblePath(), SIGNAL(elementClicked(QVariant)), this, SLOT(onCrumblePathElementClicked(QVariant)));
+ connect(m_formEditorView->crumblePath(), SIGNAL(elementClicked(QVariant)), this, SLOT(onCrumblePathElementClicked(QVariant)));
m_componentView = new ComponentView(this);
m_formEditorView->widget()->toolBox()->addLeftSideAction(m_componentView->action());