Skip to content
Snippets Groups Projects
Commit 9c777b83 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Tests on zoom bug

parent 85305ce0
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build" />
</component>
</project>
\ No newline at end of file
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -38,6 +38,8 @@
package ui;
import myutil.TraceManager;
/**
* Class TGCScalableWithInternalComponent
* Graphical component that contains one or more internal components, and which is scalable
......@@ -55,6 +57,9 @@ public abstract class TGCScalableWithInternalComponent extends TGCWithInternalCo
@Override
public void rescale(double scaleFactor){
TraceManager.addDev("rescaling with oldScaleFactor=" + oldScaleFactor +
" new scale factor = " + scaleFactor + " dx=" + dx + " dy=" + dy +
" x=" + x + " y=" + y);
rescaled = true;
dwidth = (width + dwidth) / oldScaleFactor * scaleFactor;
......@@ -87,6 +92,8 @@ public abstract class TGCScalableWithInternalComponent extends TGCWithInternalCo
y = (int)(dy);
dy = dy - y;
TraceManager.addDev("x=" + x + " y=" + y);
oldScaleFactor = scaleFactor;
if (father != null) {
......@@ -97,6 +104,8 @@ public abstract class TGCScalableWithInternalComponent extends TGCWithInternalCo
setMoveCd(x, y);
TraceManager.addDev("x=" + x + " y=" + y);
for(int i=0; i<nbInternalTGComponent; i++) {
if (tgcomponent[i] instanceof ScalableTGComponent) {
((ScalableTGComponent)tgcomponent[i]).rescale(scaleFactor);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment