summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/text-edit.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-08-02 16:50:27 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-08-02 21:26:28 +0000
commit82067a12a334c7ada0a4f61089c645f376740544 (patch)
treef220a16b905534e71d95d4e64d9d0aa423beee1a /src/ui/dialog/text-edit.cpp
parentAllow tools sensitive when overflow canvas area also fix a bug i couldent rem... (diff)
downloadinkscape-82067a12a334c7ada0a4f61089c645f376740544.tar.gz
inkscape-82067a12a334c7ada0a4f61089c645f376740544.zip
Remove line height code and ficx coding style
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
-rw-r--r--src/ui/dialog/text-edit.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index e0faa68ed..fd8422652 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -37,7 +37,6 @@ extern "C" {
#include "document-undo.h"
#include "document.h"
#include "inkscape.h"
-#include "style.h"
#include "text-editing.h"
#include "verbs.h"
@@ -49,8 +48,8 @@ extern "C" {
#include "object/sp-textpath.h"
#include "svg/css-ostringstream.h"
+
#include "ui/icon-names.h"
-#include "ui/toolbar/text-toolbar.h"
#include "ui/widget/font-selector.h"
#include "util/units.h"
@@ -269,7 +268,7 @@ void TextEdit::onReadSelection ( gboolean dostyle, gboolean /*docontent*/ )
int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
double size = sp_style_css_size_px_to_units(query.font_size.computed, unit);
font_selector.update_size (size);
- selected_fontsize = size;
+
// Update font features (variant) widget
//int result_features =
sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONTVARIANTS);
@@ -423,21 +422,18 @@ void TextEdit::onApply()
unsigned items = 0;
auto item_list = desktop->getSelection()->items();
SPCSSAttr *css = fillTextStyle ();
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ sp_desktop_set_style(desktop, css, true);
+
for(auto i=item_list.begin();i!=item_list.end();++i){
// apply style to the reprs of all text objects in the selection
if (SP_IS_TEXT (*i) || (SP_IS_FLOWTEXT (*i)) ) {
++items;
}
}
- if (items == 1) {
- double factor = font_selector.get_fontsize() / selected_fontsize;
- prefs->setDouble("/options/font/scaleLineHeightFromFontSIze", factor);
- }
- sp_desktop_set_style(desktop, css, true);
if (items == 0) {
// no text objects; apply style to prefs for new objects
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->mergeStyle("/tools/text/style", css);
setasdefault_button.set_sensitive ( false );
@@ -446,12 +442,6 @@ void TextEdit::onApply()
SPItem *item = SP_ACTIVE_DESKTOP->getSelection()->singleItem();
if (SP_IS_TEXT (item) || SP_IS_FLOWTEXT(item)) {
updateObjectText (item);
- SPStyle *item_style = item->style;
- if (SP_IS_TEXT(item) && item_style->inline_size.value == 0) {
- css = sp_css_attr_from_style(item_style, SP_STYLE_FLAG_IFSET);
- sp_repr_css_unset_property(css, "inline-size");
- item->changeCSS(css, "style");
- }
}
}