summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/src/cbutton.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'NxWidgets/libnxwidgets/src/cbutton.cxx')
-rw-r--r--NxWidgets/libnxwidgets/src/cbutton.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/NxWidgets/libnxwidgets/src/cbutton.cxx b/NxWidgets/libnxwidgets/src/cbutton.cxx
index 66ad3f2c7..429905759 100644
--- a/NxWidgets/libnxwidgets/src/cbutton.cxx
+++ b/NxWidgets/libnxwidgets/src/cbutton.cxx
@@ -275,15 +275,26 @@ void CButton::onClick(nxgl_coord_t x, nxgl_coord_t y)
}
/**
- * Raises an action event and redraws the button.
+ * Raises an action.
*
* @param x The x coordinate of the mouse.
* @param y The y coordinate of the mouse.
*/
-void CButton::onRelease(nxgl_coord_t x, nxgl_coord_t y)
+void CButton::onPreRelease(nxgl_coord_t x, nxgl_coord_t y)
{
m_widgetEventHandlers->raiseActionEvent();
+}
+
+/**
+ * Redraws the button.
+ *
+ * @param x The x coordinate of the mouse.
+ * @param y The y coordinate of the mouse.
+ */
+
+void CButton::onRelease(nxgl_coord_t x, nxgl_coord_t y)
+{
redraw();
}