Fixed negative height bug in htmlOutputView

After dragging the HTML Output window down below the bottom of the main
window it cannot be dragged back and negative height of HTML Output is
saved to file.
This commit is contained in:
Lukasz Czekaj
2012-08-26 09:21:49 +02:00
committed by Allan Odgaard
parent c7678e9f67
commit 19457ad2e8

View File

@@ -73,7 +73,7 @@ OAK_DEBUG_VAR(DocumentController);
res["windowFrame"] = to_s(NSStringFromRect([self.window frame]));
res["miniaturized"] = [self.window isMiniaturized];
res["htmlOutputHeight"] = htmlOutputView ? (int32_t)NSHeight(htmlOutputView.frame) : htmlOutputHeight;
res["htmlOutputHeight"] = htmlOutputView ? (int32_t)NSHeight(htmlOutputView.frame) > 0 ? (int32_t)NSHeight(htmlOutputView.frame) : 0 : htmlOutputHeight;
res["fileBrowserVisible"] = !self.fileBrowserHidden;
res["fileBrowserWidth"] = fileBrowser.view ? (int32_t)NSWidth(fileBrowser.view.frame) : fileBrowserWidth;