Changeset 252:dffb802cad03

Show
Ignore:
Timestamp:
07/06/08 12:45:41 (2 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix: StyledText?.paste() to check for empty clipboard result.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/custom/StyledText.d

    r246 r252  
    60396039public void paste(){ 
    60406040    checkWidget(); 
    6041     String text = (cast(ArrayWrapperString) getClipboardContent(DND.CLIPBOARD)).array; 
     6041    String text = null; 
     6042    if( auto o = cast(ArrayWrapperString) getClipboardContent(DND.CLIPBOARD)){ 
     6043        text = o.array; 
     6044    } 
    60426045    if (text !is null && text.length > 0) { 
    60436046        Event event = new Event();