summaryrefslogtreecommitdiffstats
path: root/src/dialogs/layers-panel.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2006-05-26 16:21:44 +0000
committerjoncruz <joncruz@users.sourceforge.net>2006-05-26 16:21:44 +0000
commit04b09cf816d2bd0531667b9046159bafb0e32db8 (patch)
tree3722c749d9020df703d02b29b4bc364411dc3a0e /src/dialogs/layers-panel.cpp
parentFix compile warning (diff)
downloadinkscape-04b09cf816d2bd0531667b9046159bafb0e32db8.tar.gz
inkscape-04b09cf816d2bd0531667b9046159bafb0e32db8.zip
Clear old selection when changing layer
(bzr r1022)
Diffstat (limited to 'src/dialogs/layers-panel.cpp')
-rw-r--r--src/dialogs/layers-panel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp
index ad2678141..a7ad817cf 100644
--- a/src/dialogs/layers-panel.cpp
+++ b/src/dialogs/layers-panel.cpp
@@ -26,6 +26,8 @@
#include "document.h"
#include "desktop.h"
+#include "desktop-handles.h"
+#include "selection.h"
#include "sp-object.h"
#include "sp-item.h"
#include "widgets/icon.h"
@@ -388,7 +390,6 @@ bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIt
bool stopGoing = false;
Gtk::TreeModel::Row row = *iter;
- Glib::ustring tmp = row[_model->_colLabel];
if ( layer == row[_model->_colObject] )
{
_tree.expand_to_path( path );
@@ -471,10 +472,14 @@ void LayersPanel::_pushTreeSelectionToCurrent()
if ( inTree ) {
SPObject* curr = _desktop->currentLayer();
if ( curr != inTree ) {
+ // TODO - move these to a function in layer-manager.cpp
_desktop->setCurrentLayer( inTree );
+ sp_desktop_selection(_desktop)->clear();
}
} else {
+ // TODO - move these to a function in layer-manager.cpp
_desktop->setCurrentLayer( _desktop->doc()->root );
+ sp_desktop_selection(_desktop)->clear();
}
}
@@ -571,6 +576,7 @@ void LayersPanel::_handleRowChange( Gtk::TreeModel::Path const& path, Gtk::TreeM
gchar const* oldLabel = obj->label();
Glib::ustring tmp = row[_model->_colLabel];
if ( oldLabel && oldLabel[0] && !tmp.empty() && (tmp != oldLabel) ) {
+ // TODO fix name collision bug
obj->setLabel(tmp.c_str());
}
}