summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-07 15:21:33 -0700
committerIra Rice <irarice@gmail.com>2009-02-07 15:21:33 -0700
commit472494898ee15e92f16ea5f5667c11b6f46b0057 (patch)
treeeca084e8b006735e8220274b83f667d92d4ce3cf /src/gui
parentc42eba00701f28b3cf720d90c73d1cfc6c3815da (diff)
downloadmana-472494898ee15e92f16ea5f5667c11b6f46b0057.tar.gz
mana-472494898ee15e92f16ea5f5667c11b6f46b0057.tar.bz2
mana-472494898ee15e92f16ea5f5667c11b6f46b0057.tar.xz
mana-472494898ee15e92f16ea5f5667c11b6f46b0057.zip
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 <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/shortcutwindow.cpp6
1 files changed, 3 insertions, 3 deletions
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();