Commit 03a60aa5 authored by Sven Langkamp's avatar Sven Langkamp

fix action manager test

Needs to show the view before the actions are active
Layer invisible counts as editable now
parent ecfc66dc
/*
* Copyright (c) 2013 Sven Langkamp <sven.langkamp@gmail.com>
*
......@@ -40,6 +41,7 @@ void KisActionManagerTest::testUpdateGUI()
QPointer<KisView> view = new KisView(doc, mainWindow->resourceManager(), mainWindow->actionCollection(), mainWindow);
KisViewManager *viewManager = new KisViewManager(mainWindow, mainWindow->actionCollection());
KisPart::instance()->addView(view, doc);
mainWindow->showView(view);
view->setViewManager(viewManager);
viewManager->setCurrentView(view);
......@@ -73,6 +75,7 @@ void KisActionManagerTest::testCondition()
QPointer<KisView> view = new KisView(doc, mainWindow->resourceManager(), mainWindow->actionCollection(), mainWindow);
KisViewManager *viewManager = new KisViewManager(mainWindow, mainWindow->actionCollection());
KisPart::instance()->addView(view, doc);
mainWindow->showView(view);
view->setViewManager(viewManager);
viewManager->setCurrentView(view);
......@@ -91,9 +94,9 @@ void KisActionManagerTest::testCondition()
QVERIFY(action->isEnabled());
// visible
paintLayer1->setVisible(false);
view->viewManager()->actionManager()->updateGUI();
QVERIFY(!action->isEnabled());
// paintLayer1->setVisible(false);
// view->viewManager()->actionManager()->updateGUI();
// QVERIFY(!action->isEnabled());
paintLayer1->setVisible(true);
view->viewManager()->actionManager()->updateGUI();
......@@ -116,6 +119,7 @@ void KisActionManagerTest::testTakeAction()
QPointer<KisView> view = new KisView(doc, mainWindow->resourceManager(), mainWindow->actionCollection(), mainWindow);
KisViewManager *viewManager = new KisViewManager(mainWindow, mainWindow->actionCollection());
KisPart::instance()->addView(view, doc);
mainWindow->showView(view);
view->setViewManager(viewManager);
viewManager->setCurrentView(view);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment