From 472494898ee15e92f16ea5f5667c11b6f46b0057 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 7 Feb 2009 15:21:33 -0700 Subject: While this commit isn't really needed, this cleans up the reported instances number so that it accurately reflects the number of instances, instead of always being +1. I wasn't intending on using that variable that way, but in case anyone does in the future, it'll at least be accurate. Signed-off-by: Ira Rice --- src/gui/shortcutwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/shortcutwindow.cpp') diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index dd8634f7..5d49a3c6 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -27,7 +27,7 @@ static const int SCROLL_PADDING = 0; -int ShortcutWindow::mInstances = 1; +int ShortcutWindow::mInstances = 0; ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) { @@ -39,6 +39,8 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mItems = content; + mInstances++; + const int border = SCROLL_PADDING * 2 + getPadding() * 2; setMinWidth(mItems->getBoxWidth() + border); setMinHeight(mItems->getBoxHeight() + border); @@ -59,8 +61,6 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mScrollArea->setOpaque(false); - mInstances++; - add(mScrollArea); loadWindowState(); -- cgit v1.2.3-70-g09d2