add drawing view to the list of document views

This commit is contained in:
wmayer
2012-03-31 14:09:47 +02:00
parent 170ab978fb
commit 3f06cf75ea
5 changed files with 12 additions and 9 deletions

View File

@@ -40,6 +40,7 @@
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObject.h>
#include <Gui/Application.h>
#include <Gui/SoFCSelection.h>
#include <Gui/Selection.h>
#include <Gui/MainWindow.h>
@@ -131,9 +132,11 @@ bool ViewProviderDrawingPage::doubleClicked(void)
DrawingView* ViewProviderDrawingPage::showDrawingView()
{
if (!view){
view = new DrawingView(Gui::getMainWindow());
Gui::Document* doc = Gui::Application::Instance->getDocument
(this->pcObject->getDocument());
view = new DrawingView(doc, Gui::getMainWindow());
view->setWindowIcon(Gui::BitmapFactory().pixmap("actions/drawing-landscape"));
view->setWindowTitle(QObject::tr("Drawing viewer"));
view->setWindowTitle(QObject::tr("Drawing viewer") + QString::fromAscii("[*]"));
Gui::getMainWindow()->addWindow(view);
}