summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/point.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-07-29 10:06:16 +0000
committerjabiertxof <info@marker.es>2016-07-29 10:06:16 +0000
commit881b103a91e5668c1f7333ac989e4a968aa92aed (patch)
tree7672c49ced787ae07e81cefb71f86af5a4ec5836 /src/live_effects/parameter/point.cpp
parentFix little typo (diff)
downloadinkscape-881b103a91e5668c1f7333ac989e4a968aa92aed.tar.gz
inkscape-881b103a91e5668c1f7333ac989e4a968aa92aed.zip
Improvements to widget redraw
(bzr r15017.1.11)
Diffstat (limited to 'src/live_effects/parameter/point.cpp')
-rw-r--r--src/live_effects/parameter/point.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 90a5b252b..3442fd851 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -4,7 +4,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "ui/widget/registered-widget.h"
#include "live_effects/parameter/point.h"
#include "live_effects/effect.h"
#include "svg/svg.h"
@@ -30,7 +29,8 @@ PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip,
: Parameter(label, tip, key, wr, effect),
defvalue(default_value),
liveupdate(live_update),
- knoth(NULL)
+ knoth(NULL),
+ _pointwdg(NULL)
{
knot_shape = SP_KNOT_SHAPE_DIAMOND;
knot_mode = SP_KNOT_MODE_XOR;
@@ -81,6 +81,9 @@ PointParam::param_setValue(Geom::Point newpoint, bool write)
if(knoth && liveupdate){
knoth->update_knots();
}
+ if (_pointwdg) {
+ _pointwdg->setValue( newpoint );
+ }
}
bool
@@ -116,7 +119,7 @@ PointParam::param_transform_multiply(Geom::Affine const& postmul, bool /*set*/)
Gtk::Widget *
PointParam::param_newWidget()
{
- Inkscape::UI::Widget::RegisteredTransformedPoint * pointwdg = Gtk::manage(
+ _pointwdg = Gtk::manage(
new Inkscape::UI::Widget::RegisteredTransformedPoint( param_label,
param_tooltip,
param_key,
@@ -126,13 +129,13 @@ PointParam::param_newWidget()
// TODO: fix to get correct desktop (don't use SP_ACTIVE_DESKTOP)
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Geom::Affine transf = desktop->doc2dt();
- pointwdg->setTransform(transf);
- pointwdg->setValue( *this );
- pointwdg->clearProgrammatically();
- pointwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change point parameter"));
+ _pointwdg->setTransform(transf);
+ _pointwdg->setValue( *this );
+ _pointwdg->clearProgrammatically();
+ _pointwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change point parameter"));
Gtk::HBox * hbox = Gtk::manage( new Gtk::HBox() );
- static_cast<Gtk::HBox*>(hbox)->pack_start(*pointwdg, true, true);
+ static_cast<Gtk::HBox*>(hbox)->pack_start(*_pointwdg, true, true);
static_cast<Gtk::HBox*>(hbox)->show_all_children();
param_effect->upd_params = false;
return dynamic_cast<Gtk::Widget *> (hbox);
@@ -191,13 +194,13 @@ void
PointParamKnotHolderEntity::knot_click(guint state)
{
if (state & GDK_CONTROL_MASK) {
- if (state & GDK_MOD1_MASK) {
- this->pparam->param_set_default();
- SPLPEItem * splpeitem = dynamic_cast<SPLPEItem *>(item);
- if(splpeitem){
- sp_lpe_item_update_patheffect(splpeitem, false, false);
- }
+ if (state & GDK_MOD1_MASK) {
+ this->pparam->param_set_default();
+ SPLPEItem * splpeitem = dynamic_cast<SPLPEItem *>(item);
+ if(splpeitem){
+ sp_lpe_item_update_patheffect(splpeitem, false, false);
}
+ }
}
}