From a65a5d1594d09d575d9e835d684eb52675341054 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 8 Feb 2011 09:19:14 +0000 Subject: Scroll into view when a new macro is expanded. --- client/macro.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/macro.cc') 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 ¯os, // 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(); -- cgit v1.2.3