[Jrisk-cvs] SF.net SVN: domination-code:[2523] Domination/swingUI/src/net/yura/ domination/tools/ma
Brought to you by:
yuranet
|
From: <yu...@us...> - 2024-05-06 01:17:19
|
Revision: 2523
http://sourceforge.net/p/domination/code/2523
Author: yuranet
Date: 2024-05-06 01:17:16 +0000 (Mon, 06 May 2024)
Log Message:
-----------
track map changes in map editor
Modified Paths:
--------------
Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditor.java
Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditorPanel.java
Modified: Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditor.java
===================================================================
--- Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditor.java 2024-05-04 14:09:50 UTC (rev 2522)
+++ Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditor.java 2024-05-06 01:17:16 UTC (rev 2523)
@@ -379,6 +379,7 @@
if (myMap!=null) {
//myMap.setCircleSize(circle.getValue());
myMap.setCircleSize( ((Integer)circle.getValue()).intValue() );
+ setMapChanged(true);
editPanel.repaint();
}
}
Modified: Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditorPanel.java
===================================================================
--- Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditorPanel.java 2024-05-04 14:09:50 UTC (rev 2522)
+++ Domination/swingUI/src/net/yura/domination/tools/mapeditor/MapEditorPanel.java 2024-05-06 01:17:16 UTC (rev 2523)
@@ -265,7 +265,7 @@
//newImageMap.
map.setRGB(0,0,width,height,pixels,0,width);
//map = newImageMap;
-
+ editor.setMapChanged(true);
repaint();
}
@@ -315,7 +315,7 @@
}
map.setRGB(0, 0, width, height, newpixels, 0, width);
-
+ editor.setMapChanged(true);
repaintSelected();
repaint();
}
@@ -618,6 +618,7 @@
g1.dispose();
g2.dispose();
+ editor.setMapChanged(true);
}
public Country getCountryAt(int x,int y) {
@@ -660,6 +661,7 @@
}
}
g.dispose();
+ editor.setMapChanged(true);
repaintSelected();
}
@@ -674,6 +676,7 @@
Color color = new Color(country.getColor(), country.getColor(), country.getColor());
ImageUtil.smartFill(getImagePic(), getImageMap(), country.getX(), country.getY(), color.getRGB(), smartDrawTolerance);
}
+ editor.setMapChanged(true);
repaintSelected();
}
}
@@ -822,6 +825,7 @@
}
}
map.setRGB(0,0,width,map.getHeight(),pixels,0,width);
+ editor.setMapChanged(true);
repaintSelected();
}
}
@@ -927,6 +931,7 @@
}
}
map.setRGB(0,0,width,map.getHeight(),pixels,0,width);
+ editor.setMapChanged(true);
repaintSelected();
}
}
@@ -985,6 +990,7 @@
if (!mynode.getNeighbours().contains(selected)) {
mynode.addNeighbour(selected);
}
+ editor.setMapChanged(true);
repaint();
}
@@ -1008,7 +1014,7 @@
if (!selected.getNeighbours().contains(mynode)) {
selected.addNeighbour(mynode);
}
-
+ editor.setMapChanged(true);
repaint();
}
}
@@ -1034,6 +1040,7 @@
if (mynode.getNeighbours().contains(selected)) {
mynode.getNeighbours().remove(selected);
}
+ editor.setMapChanged(true);
repaint();
}
}
@@ -1128,6 +1135,7 @@
//dragpoint = point;
scrollRectToVisible( new Rectangle(e.getX(), e.getY(), 1, 1) );
+ editor.setMapChanged(true);
repaint();
}
else if (!xdrag && dragpoint!=null) {
@@ -1136,7 +1144,6 @@
r.translate(dragpoint.x-e.getX(),dragpoint.y-e.getY());
scrollRectToVisible( r );
-
}
}
else if (mode == MODE_MOVEALL && dragpoint!=null) {
@@ -1161,6 +1168,7 @@
countries[i].setY( (int)Math.round(countryPositions[i].getY() * dif) );
}
}
+ editor.setMapChanged(true);
repaint();
}
else if (mode == MODE_DRAW && dragpoint!=null) {
|