Fixed bug #3578325, editor size doesn't to capture.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2160 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-10-19 11:50:45 +00:00
commit f6be666aab

View file

@ -93,16 +93,16 @@ namespace Greenshot {
IniConfig.IniChanged += new FileSystemEventHandler(ReloadConfiguration);
// Make sure the editor is placed on the same location as the last editor was on close
WindowDetails thisForm = new WindowDetails(this.Handle);
thisForm.SetWindowPlacement(editorConfiguration.GetEditorPlacement());
// init surface
Surface = iSurface;
// Intial "saved" flag for asking if the image needs to be save
surface.Modified = !outputMade;
updateUI();
// Make sure the editor is placed on the same location as the last editor was on close
WindowDetails thisForm = new WindowDetails(this.Handle);
thisForm.SetWindowPlacement(editorConfiguration.GetEditorPlacement());
updateUI();
// Workaround: As the cursor is (mostly) selected on the surface a funny artifact is visible, this fixes it.
hideToolstripItems();
@ -791,6 +791,9 @@ namespace Greenshot {
#region helpers
private void updateUndoRedoSurfaceDependencies() {
if (surface == null) {
return;
}
bool canUndo = surface.CanUndo;
this.btnUndo.Enabled = canUndo;
this.undoToolStripMenuItem.Enabled = canUndo;
@ -820,6 +823,9 @@ namespace Greenshot {
}
private void updateClipboardSurfaceDependencies() {
if (surface == null) {
return;
}
// check dependencies for the Surface
bool hasItems = surface.HasSelectedElements();
bool actionAllowedForSelection = hasItems && !controlsDisabledDueToConfirmable;