mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make Inlay.updateSize() imply Inlay.repaint()
otherwise clients would always need to call the latter after the former
This commit is contained in:
@@ -58,9 +58,10 @@ public interface Inlay extends Disposable, UserDataHolderEx {
|
||||
int getWidthInPixels();
|
||||
|
||||
/**
|
||||
* Updates inlay's size by querying information from inlay's renderer.
|
||||
* Updates inlay's size by querying information from inlay's renderer. Also, repaint the inlay.
|
||||
*
|
||||
* @see EditorCustomElementRenderer#calcWidthInPixels(Editor)
|
||||
* @see #repaint()
|
||||
*/
|
||||
void updateSize();
|
||||
|
||||
|
||||
-1
@@ -105,7 +105,6 @@ public class ParameterHintsPresentationManager implements Disposable {
|
||||
MyRenderer renderer = (MyRenderer)hint.getRenderer();
|
||||
renderer.update(editor, newText, useAnimation);
|
||||
hint.updateSize();
|
||||
hint.repaint();
|
||||
if (useAnimation) scheduleRendererUpdate(editor, hint);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,12 @@ class InlayImpl extends RangeMarkerImpl implements Inlay, Getter<InlayImpl> {
|
||||
public void updateSize() {
|
||||
int oldWidth = myWidthInPixels;
|
||||
doUpdateSize();
|
||||
if (oldWidth != myWidthInPixels) myEditor.getInlayModel().notifyChanged(this);
|
||||
if (oldWidth != myWidthInPixels) {
|
||||
myEditor.getInlayModel().notifyChanged(this);
|
||||
}
|
||||
else {
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user