diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-08-28 03:32:14 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-08-28 03:32:14 +0000 |
| commit | 3bfb610bb7719d49821fe5381ae449789c3cb968 (patch) | |
| tree | c6c221e0c7bfcc6399ee4aee360b7b1d4de3f896 /src/ui/clipboard.cpp | |
| parent | Use Quantity comparisons in PageSizer. (diff) | |
| download | inkscape-3bfb610bb7719d49821fe5381ae449789c3cb968.tar.gz inkscape-3bfb610bb7719d49821fe5381ae449789c3cb968.zip | |
Improve code readability.
(bzr r12475.1.9)
Diffstat (limited to 'src/ui/clipboard.cpp')
| -rw-r--r-- | src/ui/clipboard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 629960613..084b2ebd8 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1084,8 +1084,8 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/) Geom::Point origin (_clipboardSPDoc->getRoot()->x.computed, _clipboardSPDoc->getRoot()->y.computed); Geom::Rect area = Geom::Rect(origin, origin + _clipboardSPDoc->getDimensions()); - unsigned long int width = (unsigned long int) (area.width() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); - unsigned long int height = (unsigned long int) (area.height() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); + unsigned long int width = (unsigned long int) (Inkscape::Util::Quantity::convert(area.width(), "px", "in") * dpi + 0.5); + unsigned long int height = (unsigned long int) (Inkscape::Util::Quantity::convert(area.height(), "in", "px") * dpi + 0.5); // read from namedview Inkscape::XML::Node *nv = sp_repr_lookup_name (_clipboardSPDoc->rroot, "sodipodi:namedview"); |
