no more double click in minimap
Double click is no more handled when mousepointer is over minimap. This often resulted in unselected units when commanding via minimap.
This commit is contained in:
parent
4d7e0c1f4d
commit
2efa255ca3
|
@ -4355,17 +4355,21 @@ void Game::mouseDoubleClickLeft(int x, int y) {
|
|||
|
||||
const Metrics &metrics= Metrics::getInstance();
|
||||
|
||||
//display panel
|
||||
if(metrics.isInDisplay(x, y) && !gui.isSelectingPos()) {
|
||||
int xd= x - metrics.getDisplayX();
|
||||
int yd= y - metrics.getDisplayY();
|
||||
if(gui.mouseValid(xd, yd)){
|
||||
return;
|
||||
}
|
||||
if(metrics.isInMinimap(x, y)){
|
||||
// no double click on minimap
|
||||
}
|
||||
else {
|
||||
//display panel
|
||||
if(metrics.isInDisplay(x, y) && !gui.isSelectingPos()) {
|
||||
int xd= x - metrics.getDisplayX();
|
||||
int yd= y - metrics.getDisplayY();
|
||||
if(gui.mouseValid(xd, yd)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
//graphics panel
|
||||
gui.mouseDoubleClickLeftGraphics(x, y);
|
||||
}
|
||||
|
||||
//graphics panel
|
||||
gui.mouseDoubleClickLeftGraphics(x, y);
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
char szBuf[8096]="";
|
||||
|
|
Loading…
Reference in New Issue