News:

Want to praise Simutrans?
Your feedback is important for us ;D.

r1942 - Drag tools work as double click when left button being released

Started by z9999, August 08, 2008, 11:05:01 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

z9999

r1942 GDI

Problem:
- Raise land tool works as double click when left button being released after dragging
- Add forest tool works as double click when left button being released after dragging

Note:
This is an another problem.
In r1943, All drag tools and drag scrooll work only with pausing but don't work well with playing mode.

z9999


Index: simwerkz.cc
===================================================================
--- simwerkz.cc (r1947)
+++ simwerkz.cc (copy)
@@ -570,9 +570,6 @@
default_param = NULL;
return result;
}
- else {
- is_dragging = false;
- }
return NULL;
}

@@ -608,6 +605,10 @@
ok = true;
}
else {
+ if(is_dragging) {
+ is_dragging = false;
+ return NULL;
+ }
n = welt->raise(pos);
ok = (n!=0);
}
@@ -648,10 +649,6 @@
default_param = NULL;
return result;
}
- else {
- default_param = NULL;
- is_dragging = false;
- }
return NULL;
}

@@ -687,6 +684,10 @@
ok = welt->lookup_hgt(pos);
}
else {
+ if(is_dragging) {
+ is_dragging = false;
+ return NULL;
+ }
n = welt->lower(pos);
ok = (n!=0);
}
@@ -3101,25 +3102,6 @@
welt->mark_area(nw, wh, true);
}
}
- else {
- if(marked!=NULL) {
- welt->mark_area(nw, wh, false);
- // prepare for building!
- nw = gr->gib_pos();
-
- wh.x = abs(nw.x-start.x)+1;
- wh.y = abs(nw.y-start.y)+1;
- nw.x = min(start.x, nw.x)+(wh.x/2);
- nw.y = min(start.y, nw.y)+(wh.y/2);
-
- // remove old pointers
- init(welt,sp);
-
- baum_t::create_forest( welt, nw.gib_2d(), wh );
- }
- // init anyway
- init( welt, sp );
- }
return NULL;
}



prissi

Tahnk you, forgot about that. Do you find this system of handling stuff better?

z9999

Yes, I like the new one better. And also response and performance in r1950 is good.
Thank you.  :)