diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index cfc1bfeb256da45dd1e0dffa90636a656c484625..3ff79a0d3b2e8efdeb556c9d3b3a42c95bb2dd06 100644 (file)
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
bool
Find::item_type_match (SPItem *item)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SPDesktop *desktop = getDesktop();
if (SP_IS_RECT(item)) {
return (_check_all_shapes.get_active() || _check_rects.get_active());
GSList *
Find::all_items (SPObject *r, GSList *l, bool hidden, bool locked)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SPDesktop *desktop = getDesktop();
if (SP_IS_DEFS(r))
return l; // we're not interested in items in defs
GSList *
Find::all_selection_items (Inkscape::Selection *s, GSList *l, SPObject *ancestor, bool hidden, bool locked)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SPDesktop *desktop = getDesktop();
- for (GSList *i = (GSList *) s->itemList(); i != NULL; i = i->next) {
+ for (GSList *i = (GSList *) s->itemList(); i != NULL; i = i->next) {
if (SP_IS_ITEM (i->data) && !SP_OBJECT_IS_CLONED (i->data) && !desktop->isLayer(SP_ITEM(i->data))) {
if (!ancestor || ancestor->isAncestorOf(SP_OBJECT (i->data))) {
if ((hidden || !desktop->itemIsHidden(SP_ITEM(i->data))) && (locked || !SP_ITEM(i->data)->isLocked())) {
void
Find::onFind()
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SPDesktop *desktop = getDesktop();
bool hidden = _check_include_hidden.get_active();
bool locked = _check_include_locked.get_active();