From: joncruz Date: Sun, 5 Mar 2006 05:41:33 +0000 (+0000) Subject: Fixed problem for 2.4.x X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5d9b6c6850483b3c937c57765c9a2b38c5c57a68;p=inkscape.git Fixed problem for 2.4.x --- diff --git a/src/ui/previewholder.cpp b/src/ui/previewholder.cpp index c2bc13327..f809ba44c 100644 --- a/src/ui/previewholder.cpp +++ b/src/ui/previewholder.cpp @@ -189,7 +189,8 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int& height = 1; if ( _anchor == Gtk::ANCHOR_SOUTH || _anchor == Gtk::ANCHOR_NORTH ) { - Gtk::Requisition req = _scroller->size_request(); + Gtk::Requisition req; + _scroller->size_request(req); int currW = _scroller->get_width(); if ( currW > req.width ) { req.width = currW; @@ -197,13 +198,15 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int& Gtk::HScrollbar* hs = dynamic_cast(_scroller)->get_hscrollbar(); if ( hs ) { - Gtk::Requisition scrollReq = hs->size_request(); + Gtk::Requisition scrollReq; + hs->size_request(scrollReq); // the +8 is a temporary hack req.height -= scrollReq.height + 8; } - Gtk::Requisition req2 = thing->size_request(); + Gtk::Requisition req2; + thing->size_request(req2); int h2 = req.height / req2.height; int w2 = req.width / req2.width;