summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-10-18 17:00:48 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-10-18 17:00:48 +0200
commit56af338cfde02e74f236f55dc72631c3b8d8008c (patch)
tree677f94dbfbd41a494a5eb7689893acf792255e95
parent27a779b2357fb27ae834e8921323f09fd3288940 (diff)
Fix Fl_Tile::set_cursor() which was broken
... since commit 6ba7b49baf11e526d1ed19aef491db2cd120e55e.
-rw-r--r--src/Fl_Tile.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx
index b0f41ee89..a24fe56cf 100644
--- a/src/Fl_Tile.cxx
+++ b/src/Fl_Tile.cxx
@@ -192,11 +192,11 @@ void Fl_Tile::resize(int X,int Y,int W,int H) {
This method sets the window cursor for the given index \p n.
*/
void Fl_Tile::set_cursor(int n) {
- if (n < 0 || n > 3) n = 0; // check array index
- cursor_ = n; // always store the index
- if (cursor_ == n || !window())
- return;
- window()->cursor(cursor(n));
+ if (n < 0 || n > 3) n = 0; // check array index
+ if (cursor_ == n) return; // nothing to do
+ cursor_ = n; // store the cursor index
+ if (window())
+ window()->cursor(cursor(n));
}
#define DRAGH 1