summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/selectorsdialog.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-08-28 22:14:20 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-08-29 16:35:27 +0000
commita8d586f25d06ce66420f9d09fcaf959d7cbd3189 (patch)
tree86ea44da74e95373aeb22cf20658dbdc1eeabd2c /src/ui/dialog/selectorsdialog.cpp
parentDocument Properties Grid tab keeps current position (diff)
downloadinkscape-a8d586f25d06ce66420f9d09fcaf959d7cbd3189.tar.gz
inkscape-a8d586f25d06ce66420f9d09fcaf959d7cbd3189.zip
Noumerous bugfixes pointed in Rocket Chat
Diffstat (limited to 'src/ui/dialog/selectorsdialog.cpp')
-rw-r--r--src/ui/dialog/selectorsdialog.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/ui/dialog/selectorsdialog.cpp b/src/ui/dialog/selectorsdialog.cpp
index 3cc0a1739..bbe0576dc 100644
--- a/src/ui/dialog/selectorsdialog.cpp
+++ b/src/ui/dialog/selectorsdialog.cpp
@@ -34,9 +34,9 @@
#include <regex>
#include <utility>
-// G_MESSAGES_DEBUG=DEBUG_STYLEDIALOG gdb ./inkscape
-//#define DEBUG_SELECTORSDIALOG
-//#define G_LOG_DOMAIN "SELECTORSDIALOG"
+// G_MESSAGES_DEBUG=DEBUG_SELECTORSDIALOG gdb ./inkscape
+// #define DEBUG_SELECTORSDIALOG
+// #define G_LOG_DOMAIN "SELECTORSDIALOG"
using Inkscape::DocumentUndo;
using Inkscape::Util::List;
@@ -380,6 +380,7 @@ void SelectorsDialog::_showWidgets()
int panedpos = prefs->getInt("/dialogs/selectors/panedpos", widthpos / 2);
_paned.property_position().signal_changed().connect(sigc::mem_fun(*this, &SelectorsDialog::_childresized));
_paned.signal_size_allocate().connect(sigc::mem_fun(*this, &SelectorsDialog::_panedresized));
+ _paned.signal_realize().connect(sigc::mem_fun(*this, &SelectorsDialog::_panedrealized));
_updating = true;
_paned.property_position() = panedpos;
_updating = false;
@@ -393,6 +394,11 @@ void SelectorsDialog::_panedresized(Gtk::Allocation allocation)
_resized();
}
+void SelectorsDialog::_panedrealized()
+{
+ _style_dialog->readStyleElement();
+}
+
void SelectorsDialog::_childresized()
{
g_debug("SelectorsDialog::_childresized");
@@ -417,6 +423,7 @@ void SelectorsDialog::_resized()
if (_paned.property_position() < min) {
_paned.property_position() = min;
}
+
prefs->setInt("/dialogs/selectors/panedpos", _paned.property_position());
_updating = false;
}
@@ -504,14 +511,14 @@ Inkscape::XML::Node *SelectorsDialog::_getStyleTextNode()
*/
void SelectorsDialog::_readStyleElement()
{
- g_debug("SelectorsDialog::_readStyleElement: updating %s", (_updating ? "true" : "false"));
+ g_debug("SelectorsDialog::_readStyleElement(): updating %s", (_updating ? "true" : "false"));
if (_updating) return; // Don't read if we wrote style element.
_updating = true;
_scroollock = true;
Inkscape::XML::Node * textNode = _getStyleTextNode();
if (textNode == nullptr) {
- std::cerr << "SelectorsDialog::_readStyleElement: No text node!" << std::endl;
+ std::cerr << "SelectorsDialog::_readStyleElement(): No text node!" << std::endl;
}
// Get content from style text node.
@@ -583,7 +590,7 @@ void SelectorsDialog::_readStyleElement()
if ((i+1) < tokens.size()) {
properties = tokens[i+1];
} else {
- std::cerr << "SelectorsDialog::_readStyleElement: Missing values "
+ std::cerr << "SelectorsDialog::_readStyleElement(): Missing values "
"for last selector!"
<< std::endl;
}