]> Shamusworld >> Repos - ttedit/blobdiff - src/toolwindow.cpp
Fix zoom to zoom in/out from the center.
[ttedit] / src / toolwindow.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 1cc41e3..fda5b8e
@@ -6,7 +6,7 @@
 // JLH = James L. Hammons <jlhamm@acm.org>
 //
 // Who  When        What
-// ---  ----------  -------------------------------------------------------------
+// ---  ----------  -----------------------------------------------------------
 // JLH  08/28/2008  Created this file
 // JLH  03/11/2009  Converted from wxWidgets to Qt
 //
@@ -23,7 +23,6 @@
 #define DEBUGTP                                // Toolpalette debugging...
 
 #include "toolwindow.h"
-#include "types.h"
 
 
 ToolWindow::ToolWindow(void): QWidget(NULL, Qt::Window | Qt::FramelessWindowHint),
@@ -72,7 +71,7 @@ ToolType ToolWindow::FindSelectedTool(void)
 //printf("pt = %u, %u\n", pt.x(), pt.y());
 
        // Divide mouse coords by the bitmap stamp size to find which one is pointed to
-       uint32 x = (uint32)pt.x() / sizeStamp.x(), y = (uint32)pt.y() / sizeStamp.y();
+       uint32_t x = (uint32_t)pt.x() / sizeStamp.x(), y = (uint32_t)pt.y() / sizeStamp.y();
 
        // Preset failure into newTool, in case no new tool is selected
        ToolType newTool = TOOLNone;
@@ -82,8 +81,10 @@ ToolType ToolWindow::FindSelectedTool(void)
                newTool = (ToolType)((y * 4) + x);
 
        // We don't have 11 yet, so fix this if the user selected the blank space
-       if (newTool > 9)
-               newTool = TOOLNone;
+//now we do!
+//     if (newTool > 10)
+//             newTool = TOOLNone;
 
        return newTool;
 }
+