summaryrefslogtreecommitdiff
path: root/client/macro.cc
diff options
context:
space:
mode:
authordeva <deva>2011-02-08 09:19:14 +0000
committerdeva <deva>2011-02-08 09:19:14 +0000
commita65a5d1594d09d575d9e835d684eb52675341054 (patch)
tree8829f4ffbb14b7f667fa054758e607b09fff0121 /client/macro.cc
parent9d1dc91e1e2c11ea6df8e163b0e43f1dd43655d5 (diff)
Scroll into view when a new macro is expanded.
Diffstat (limited to 'client/macro.cc')
-rw-r--r--client/macro.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/macro.cc b/client/macro.cc
index 4ac56f6..6e58a5c 100644
--- a/client/macro.cc
+++ b/client/macro.cc
@@ -35,11 +35,13 @@
#include "macrodrawer.h"
#include "macrowindow.h"
-Macro::Macro(QDomNode &n)
+Macro::Macro(QDomNode &n, QScrollArea *scrollarea)
{
window = NULL;
drawer = NULL;
+ this->scrollarea = scrollarea;
+
update(n);
}
@@ -95,7 +97,8 @@ void Macro::init(QBoxLayout *layout, Macros &macros,
// if(macros.find(name) == macros.end()) {
if(window == NULL && drawer == NULL) {
- window = new MacroWindow(netcom, node, templ, isstatic, iscompact);
+ window = new MacroWindow(netcom, node, templ, isstatic, iscompact,
+ scrollarea);
/*
QWidget *edge = new QWidget();