Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » de-select a shape on double click
de-select a shape on double click [message #650473] Tue, 25 January 2011 07:52 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 220
Registered: July 2009
Senior Member
Hi,

I'm trying to de-select a shape on a double click.
I'm using a AbstractCustomFeature and in the execute method I'm just doing

public void execute(ICustomContext context) {
getDiagramEditor().setPictogramElementForSelection(null);
getDiagramEditor().refresh();
}

But this doesn't remove the selection feedback from the current figure.

Any hints what I can do?

Thanks,
Henrik
Re: de-select a shape on double click [message #650481 is a reply to message #650473] Tue, 25 January 2011 08:12 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1635
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Henrik,

this metthod is just a setted for a member variable that is actually read
while doing a refresh (lazy refresh). Try calling refresh on the editor
afterwards or using selectPictogramElements.

Michael


"Henrik Rentz-Reichert" wrote in message
news:ihlv4q$51r$1@news.eclipse.org...

Hi,

I'm trying to de-select a shape on a double click.
I'm using a AbstractCustomFeature and in the execute method I'm just doing

public void execute(ICustomContext context) {
getDiagramEditor().setPictogramElementForSelection(null);
getDiagramEditor().refresh();
}

But this doesn't remove the selection feedback from the current figure.

Any hints what I can do?

Thanks,
Henrik
Re: de-select a shape on double click [message #650497 is a reply to message #650481] Tue, 25 January 2011 09:50 Go to previous message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 220
Registered: July 2009
Senior Member
Michael,

fine, I changed that to

getDiagramEditor().selectPictogramElements(new PictogramElement[] {});

(without refresh).

Now it works like a charm :-)

-Henrik

Am 25.01.2011 09:12, schrieb Michael Wenz:
> Hi Henrik,
>
> this metthod is just a setted for a member variable that is actually
> read while doing a refresh (lazy refresh). Try calling refresh on the
> editor afterwards or using selectPictogramElements.
>
> Michael
>
>
> "Henrik Rentz-Reichert" wrote in message
> news:ihlv4q$51r$1@news.eclipse.org...
>
> Hi,
>
> I'm trying to de-select a shape on a double click.
> I'm using a AbstractCustomFeature and in the execute method I'm just doing
>
> public void execute(ICustomContext context) {
> getDiagramEditor().setPictogramElementForSelection(null);
> getDiagramEditor().refresh();
> }
>
> But this doesn't remove the selection feedback from the current figure.
>
> Any hints what I can do?
>
> Thanks,
> Henrik
Previous Topic:Share EditingDomain between multiple diagram editors
Next Topic:check before modify
Goto Forum:
  


Current Time: Thu Nov 27 05:56:09 GMT 2014

Powered by FUDForum. Page generated in 0.02017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software