From 7f1129df3b22334f6531d82f9dee95f26bb860e3 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 27 Jun 2015 12:53:46 +0200 Subject: [PATCH] cleaned up DialogueSubView constructor; moved bottom box below button bar --- apps/opencs/view/world/dialoguesubview.cpp | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index a2f25df44..5669d9680 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -706,23 +706,27 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, : SimpleDialogueSubView (id, document) { // bottom box - getMainLayout().addWidget (mBottom = new TableBottomBox (creatorFactory, document, id, this)); + mBottom = new TableBottomBox (creatorFactory, document, id, this); - mBottom->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); + mBottom->setSizePolicy (QSizePolicy::Ignored, QSizePolicy::Fixed); - connect(mBottom, SIGNAL(requestFocus(const std::string&)), this, SLOT(requestFocus(const std::string&))); + connect (mBottom, SIGNAL (requestFocus (const std::string&)), + this, SLOT (requestFocus (const std::string&))); - // buttons + // button bar RecordButtonBar *buttons = new RecordButtonBar (getTable(), mBottom, &getCommandDispatcher(), this); - - getMainLayout().addWidget (buttons); - connect (buttons, SIGNAL(nextId()), this, SLOT(nextId())); - connect (buttons, SIGNAL (prevId()), this, SLOT(prevId())); - connect (buttons, SIGNAL (cloneRequest()), this, SLOT(cloneRequest())); - connect (buttons, SIGNAL (showPreview()), this, SLOT(showPreview())); - connect (buttons, SIGNAL (viewRecord()), this, SLOT(viewRecord())); + // layout + getMainLayout().addWidget (buttons); + getMainLayout().addWidget (mBottom); + + // connections + connect (buttons, SIGNAL (nextId()), this, SLOT (nextId())); + connect (buttons, SIGNAL (prevId()), this, SLOT (prevId())); + connect (buttons, SIGNAL (cloneRequest()), this, SLOT (cloneRequest())); + connect (buttons, SIGNAL (showPreview()), this, SLOT (showPreview())); + connect (buttons, SIGNAL (viewRecord()), this, SLOT (viewRecord())); } void CSVWorld::DialogueSubView::cloneRequest()