Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/23/11 09:28:34 (13 years ago)
Author:
abeham
Message:

#1330

  • Adapted QAP to new problem base class structure
  • Fixed a bug in a view
  • Merged changes from Optimization plugin into branch
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QAPView.cs

    r5723 r5811  
    144144
    145145    private void SetupDefaultBitmap() {
    146       if (defaultBitmap != null) defaultBitmap.Dispose();
    147       defaultBitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
    148       WriteCenteredTextToBitmap(ref defaultBitmap, "No visualization available");
     146      if (defaultBitmap != null) {
     147        defaultBitmap.Dispose();
     148        defaultBitmap = null;
     149      }
     150      if (pictureBox.Width > 0 && pictureBox.Height > 0) {
     151        defaultBitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
     152        WriteCenteredTextToBitmap(ref defaultBitmap, "No visualization available");
     153      }
    149154    }
    150155
     
    450455      if (bitmap != null) bitmap.Dispose();
    451456      bitmap = null;
    452       defaultBitmap.Dispose();
    453       defaultBitmap = null;
     457      if (defaultBitmap != null) {
     458        defaultBitmap.Dispose();
     459        defaultBitmap = null;
     460      }
    454461    }
    455462  }
Note: See TracChangeset for help on using the changeset viewer.